File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ const generate = (lang) => {
43
43
{
44
44
margin : [ 30 , 5 , 30 , 5 ] ,
45
45
text : src ,
46
+ preserveLeadingSpaces : true ,
46
47
} ,
47
48
] ,
48
49
] ,
@@ -57,7 +58,7 @@ const generate = (lang) => {
57
58
let block = BLOCK_TEXT ;
58
59
let lines = [ ] ;
59
60
for ( const row of rows ) {
60
- if ( row . startsWith ( '#' ) ) {
61
+ if ( block === BLOCK_TEXT && row . startsWith ( '#' ) ) {
61
62
caption ( row ) ;
62
63
} else if ( row . startsWith ( '```' ) ) {
63
64
if ( block === BLOCK_TEXT ) {
@@ -70,11 +71,9 @@ const generate = (lang) => {
70
71
}
71
72
} else if ( row . trim ( ) . substring ( 0 , 3 ) . includes ( '.' ) ) {
72
73
index ( row ) ;
73
- } else if ( row === '' ) {
74
- if ( block === BLOCK_TEXT ) {
75
- para ( lines . join ( ' ' ) ) ;
76
- lines = [ ] ;
77
- }
74
+ } else if ( block === BLOCK_TEXT && row === '' ) {
75
+ para ( lines . join ( ' ' ) ) ;
76
+ lines = [ ] ;
78
77
} else {
79
78
lines . push ( row ) ;
80
79
}
You can’t perform that action at this time.
0 commit comments