Fixing farkup's parsing of [aaa]
parent
a40b4f6dfa
commit
13f553b284
|
@ -182,7 +182,7 @@ link-no-follow? off
|
||||||
[ "<table><tr><td>foo|bar</td></tr></table>" ] [ "|foo\\|bar|" convert-farkup ] unit-test
|
[ "<table><tr><td>foo|bar</td></tr></table>" ] [ "|foo\\|bar|" convert-farkup ] unit-test
|
||||||
[ "<p></p>" ] [ "\\" convert-farkup ] unit-test
|
[ "<p></p>" ] [ "\\" convert-farkup ] unit-test
|
||||||
|
|
||||||
! [ "<p>[abc]</p>" ] [ "[abc]" convert-farkup ] unit-test
|
[ "<p>[abc]</p>" ] [ "[abc]" convert-farkup ] unit-test
|
||||||
|
|
||||||
: random-markup ( -- string )
|
: random-markup ( -- string )
|
||||||
10 [
|
10 [
|
||||||
|
|
|
@ -121,7 +121,7 @@ DEFER: (parse-paragraph)
|
||||||
] if
|
] if
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: take-until ( state delimiter -- string/f state' )
|
: take-until ( state delimiter -- string state'/f )
|
||||||
V{ } clone (take-until) ;
|
V{ } clone (take-until) ;
|
||||||
|
|
||||||
: count= ( string -- n )
|
: count= ( string -- n )
|
||||||
|
@ -186,11 +186,12 @@ DEFER: (parse-paragraph)
|
||||||
|
|
||||||
: parse-code ( state -- state' item )
|
: parse-code ( state -- state' item )
|
||||||
dup 1 look CHAR: [ =
|
dup 1 look CHAR: [ =
|
||||||
[ unclip-slice make-paragraph ] [
|
[ take-line make-paragraph ] [
|
||||||
"{" take-until
|
dup "{" take-until [
|
||||||
[ rest ] dip
|
[ nip rest ] dip
|
||||||
"}]" take-until
|
"}]" take-until
|
||||||
[ code boa ] dip swap
|
[ code boa ] dip swap
|
||||||
|
] [ drop take-line make-paragraph ] if*
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: parse-item ( state -- state' item )
|
: parse-item ( state -- state' item )
|
||||||
|
|
Loading…
Reference in New Issue