File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -980,7 +980,11 @@ var parseInline = function(block) {
980
980
// Parse string content in block into inline children,
981
981
// using refmap to resolve references.
982
982
var parseInlines = function ( block ) {
983
- this . subject = block . _string_content . trim ( ) ;
983
+ // trim() removes non-ASCII whitespaces, vertical tab, form feed and so on.
984
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim#return_value
985
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#white_space
986
+ // Removes only ASCII tab and space.
987
+ this . subject = block . _string_content . replace ( / ^ [ \t \r \n ] + | [ \t \r \n ] + $ / g, "" )
984
988
this . pos = 0 ;
985
989
this . delimiters = null ;
986
990
this . brackets = null ;
Original file line number Diff line number Diff line change @@ -518,3 +518,22 @@ foo <!-- test --> more -->
518
518
<p>foo <!-----></p>
519
519
<p>foo <!-- test --> more --></p>
520
520
````````````````````````````````
521
+
522
+ #261
523
+ ```````````````````````````````` example
524
+ Vertical Tab
525
+
526
+ Form Feed
527
+
528
+ 全角スペース (U+3000) 全形空白
529
+
530
+ Em Space (U+2003) Em Space
531
+
532
+ NBSP (U+00A0) NBSP
533
+ .
534
+ <p>Vertical Tab</p>
535
+ <p>Form Feed</p>
536
+ <p> 全角スペース (U+3000) 全形空白 </p>
537
+ <p> Em Space (U+2003) Em Space </p>
538
+ <p> NBSP (U+00A0) NBSP </p>
539
+ ````````````````````````````````
You can’t perform that action at this time.
0 commit comments