diff --git a/README.markdown b/README.markdown index 9e1acc3..bedaa47 100644 --- a/README.markdown +++ b/README.markdown @@ -67,23 +67,6 @@ See the [original README][] for details. [original README]: https://github.com/jgm/peg-markdown/blob/master/README.markdown [knieriem/peg]: https://github.com/knieriem/peg -## Known issues - -Emphasis and strong markup within items of lists, as in input -like ./PHP Markdown Extra.mdtest/Emphasis.text from Michel -Fortin's [MDTest][] package, - - 1. ***test test*** - 2. ___test test___ - 3. *test **test*** - 4. **test *test*** - ... - -seem to present a problem for the LEG parser, which needs -(on my system) around four minutes to process that file. - -[MDTest]: http://git.michelf.com/mdtest/ - ## Todo * Implement definition lists (work in progress), and perhaps tables diff --git a/parser.leg b/parser.leg index 86bccb1..e2407f3 100644 --- a/parser.leg +++ b/parser.leg @@ -137,11 +137,17 @@ AtxHeading = s:AtxStart Sp a:StartList ( AtxInline { a = cons($$, a) } )+ (Sp '# SetextHeading = SetextHeading1 | SetextHeading2 -SetextHeading1 = a:StartList ( !Endline Inline { a = cons($$, a) } )+ Newline "===" '='* Newline - { $$ = mk_list(H1, a) } +SetextBottom1 = "===" '='* Newline -SetextHeading2 = a:StartList ( !Endline Inline { a = cons($$, a) } )+ Newline "---" '-'* Newline - { $$ = mk_list(H2, a) } +SetextBottom2 = "---" '-'* Newline + +SetextHeading1 = &(RawLine SetextBottom1) + a:StartList ( !Endline Inline { a = cons($$, a) } )+ Newline + SetextBottom1 { $$ = mk_list(H1, a) } + +SetextHeading2 = &(RawLine SetextBottom2) + a:StartList ( !Endline Inline { a = cons($$, a) } )+ Newline + SetextBottom2 { $$ = mk_list(H2, a) } Heading = AtxHeading | SetextHeading