From 916983bf943cf7eb1632dbe6014de303f26ffb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Teichgr=C3=A4ber?= Date: Mon, 21 Feb 2011 02:37:19 +0100 Subject: [PATCH] Fixed smart quotes with accented letters. [jgm/peg-markdown] See https://github.com/jgm/peg-markdown/commit/aa75ac6 --- parser.leg | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/parser.leg b/parser.leg index 3f13e2f..6adf12e 100644 --- a/parser.leg +++ b/parser.leg @@ -628,9 +628,9 @@ RawHtml = < (HtmlComment | HtmlTag) > BlankLine = Sp Newline Quoted = '"' (!'"' .)* '"' | '\'' (!'\'' .)* '\'' -HtmlAttribute = (Alphanumeric | '-')+ Spnl ('=' Spnl (Quoted | (!'>' Nonspacechar)+))? Spnl +HtmlAttribute = (AlphanumericAscii | '-')+ Spnl ('=' Spnl (Quoted | (!'>' Nonspacechar)+))? Spnl HtmlComment = "" .)* "-->" -HtmlTag = '<' Spnl '/'? Alphanumeric+ Spnl HtmlAttribute* '/'? Spnl '>' +HtmlTag = '<' Spnl '/'? AlphanumericAscii+ Spnl HtmlAttribute* '/'? Spnl '>' Eof = !. Spacechar = ' ' | '\t' Nonspacechar = !Spacechar !Newline . @@ -639,7 +639,9 @@ Sp = Spacechar* Spnl = Sp (Newline Sp)? SpecialChar = '*' | '_' | '`' | '&' | '[' | ']' | '<' | '!' | '\\' | ExtendedSpecialChar NormalChar = !( SpecialChar | Spacechar | Newline ) . -Alphanumeric = [A-Za-z0-9] +NonAlphanumeric = [\000-\057\072-\100\133-\140\173-\177] +Alphanumeric = [0-9A-Za-z\178-\377] +AlphanumericAscii = [A-Za-z0-9] Digit = [0-9] HexEntity = < '&' '#' [Xx] [0-9a-fA-F]+ ';' > @@ -686,7 +688,7 @@ EmDash = ("---" | "--") SingleQuoteStart = '\'' ![)!\],.;:-? \t\n] !( ( "s" | "t" | "m" | "ve" | "ll" | "re" ) !Alphanumeric ) -SingleQuoteEnd = '\'' !Alphanumeric +SingleQuoteEnd = '\'' &NonAlphanumeric SingleQuoted = SingleQuoteStart a:StartList