public
Description: An implementation of markdown in C, using a PEG grammar
Clone URL: git://github.com/jgm/peg-markdown.git
Modified UlOrStarLine to skip sequences of _ or * with space on both 
sides.
jgm (author)
Wed Jun 18 08:00:49 -0700 2008
commit  22058c5a6890133725ead276f5ade18c0807a91b
tree    d7d09035939b9413a2883a1ff953bdea9ce5f407
parent  d2f8e7263f094a36fcd70a675fa75567adfe066c
...
335
336
337
338
339
 
340
341
342
...
379
380
381
382
 
 
383
384
385
 
 
386
387
388
...
335
336
337
 
338
339
340
341
342
...
379
380
381
 
382
383
384
 
 
385
386
387
388
389
0
@@ -335,8 +335,8 @@ Inlines = a:StartList ( !Endline Inline { a = cons($$, a); }
0
 Inline = Str
0
         | LineBreak
0
         | Endline
0
- | Space
0
         | UlOrStarLine
0
+ | Space
0
         | Strong
0
         | Emph
0
         | Image
0
@@ -379,10 +379,11 @@ LineBreak = " " Endline
0
 Symbol = < SpecialChar >
0
             { $$ = mk_str(yytext); }
0
 
0
-# This keeps the parser from getting bogged down on long strings of '*' or '_':
0
+# This keeps the parser from getting bogged down on long strings of '*' or '_',
0
+# or strings of '*' or '_' with space on each side:
0
 UlOrStarLine = UlLine | StarLine { $$ = mk_str(yytext); }
0
-StarLine = < "****" '*'* >
0
-UlLine = < "____" '_'* >
0
+StarLine = < "****" '*'* | Spacechar '*'+ Spacechar >
0
+UlLine = < "____" '_'* | Spacechar '_'+ Spacechar >
0
 
0
 Emph = EmphStar | EmphUl
0
 

Comments

    No one has commented yet.