public
Description: An implementation of markdown in C, using a PEG grammar
Clone URL: git://github.com/jgm/peg-markdown.git
Search Repo:
Fixed two HTML block bugs:
- don't require blank line after HTML block
- allow '-' in attribute identifiers
jgm (author)
Tue May 06 11:52:11 -0700 2008
commit  efdfaee157d3764936e4419809b4b9aa56d73cbc
tree    5f44dcc59eab0b85a005340207641f455f5417cc
parent  5559b1897094f03b883f988e57ecc91d98b681f4
...
506
507
508
509
 
510
511
512
...
706
707
708
709
 
710
711
712
...
506
507
508
 
509
510
511
512
...
706
707
708
 
709
710
711
712
0
@@ -506,7 +506,7 @@
0
                 | HtmlBlockOpenScript (HtmlBlockInTags | !HtmlBlockCloseScript .)* HtmlBlockCloseScript
0
 
0
 HtmlBlock = < ( HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing ) >
0
- BlankLine BlankLine+
0
+ BlankLine BlankLine+
0
             { $$ = mk_str(yytext); $$.key = HTMLBLOCK; }
0
 
0
 HtmlBlockSelfClosing = '<' Spnl HtmlBlockType Spnl HtmlAttribute* '/' Spnl '>'
0
@@ -706,7 +706,7 @@
0
                 { $$ = mk_str("\n"); }
0
 
0
 Quoted = '"' (!'"' .)* '"' | '\'' (!'\'' .)* '\''
0
-HtmlAttribute = Alphanumeric+ Spnl ('=' Spnl (Quoted | Nonspacechar+))? Spnl
0
+HtmlAttribute = (Alphanumeric | '-')+ Spnl ('=' Spnl (Quoted | Nonspacechar+))? Spnl
0
 HtmlComment = "<!--" (!"-->" .)* "-->"
0
 HtmlTag = '<' Spnl '/'? Alphanumeric+ Spnl HtmlAttribute* '/'? Spnl '>'
0
 Eof = !.

Comments

    No one has commented yet.