@@ -6,7 +6,7 @@ import { blockTag } from '../tag-helpers/block-tag.js';
66import inlineTag from '../tag-helpers/inline-tag.js' ;
77import { getAttribute , indentify } from '../utils.js' ;
88
9- export const code = ( tag , context ) => inlineTag ( ( value , tag , globalContext ) => {
9+ export const code = ( tag , context ) => inlineTag ( ( value , tag ) => {
1010 const classAttributes = getAttribute ( tag , 'class' , '' ) . split ( ' ' ) ;
1111
1212 const content = value . at ( - 1 ) === '\n' ? value . slice ( 0 , - 1 ) : value ;
@@ -46,18 +46,18 @@ export const code = (tag, context) => inlineTag((value, tag, globalContext) => {
4646 `${ index + 1 } ` . padStart ( codeLinesLength , ' ' ) ,
4747 ) } ${ indentify (
4848 pad ,
49- true ,
49+ false ,
5050 ) (
5151 wrapAnsi ( codeLine , context . lineWidth - pad . length - 1 , {
5252 trim : false ,
5353 } ) ,
5454 ) } `,
5555 ) ;
5656
57- return indentify ( ' ' ) ( codeContent . join ( '\n' ) ) ;
57+ return indentify ( ' ' , false ) ( codeContent . join ( '\n' ) ) ;
5858} ) ( tag , context ) ;
5959
60- export const pre = ( tag , context ) => blockTag ( ( value , tag ) => value , { marginTop : 2 , marginBottom : 2 } ) (
60+ export const pre = ( tag , context ) => blockTag ( ( value ) => value , { marginTop : 2 , marginBottom : 2 } ) (
6161 tag ,
6262 { ...context , pre : true , lineWidth : context . lineWidth - 10 } ,
6363) ;
0 commit comments