Fixed smart quotes with accented letters. [jgm/peg-markdown]
See https://github.com/jgm/peg-markdown/commit/aa75ac6
This commit is contained in:
parent
7cfd682971
commit
916983bf94
10
parser.leg
10
parser.leg
@ -628,9 +628,9 @@ RawHtml = < (HtmlComment | HtmlTag) >
|
|||||||
BlankLine = Sp Newline
|
BlankLine = Sp Newline
|
||||||
|
|
||||||
Quoted = '"' (!'"' .)* '"' | '\'' (!'\'' .)* '\''
|
Quoted = '"' (!'"' .)* '"' | '\'' (!'\'' .)* '\''
|
||||||
HtmlAttribute = (Alphanumeric | '-')+ Spnl ('=' Spnl (Quoted | (!'>' Nonspacechar)+))? Spnl
|
HtmlAttribute = (AlphanumericAscii | '-')+ Spnl ('=' Spnl (Quoted | (!'>' Nonspacechar)+))? Spnl
|
||||||
HtmlComment = "<!--" (!"-->" .)* "-->"
|
HtmlComment = "<!--" (!"-->" .)* "-->"
|
||||||
HtmlTag = '<' Spnl '/'? Alphanumeric+ Spnl HtmlAttribute* '/'? Spnl '>'
|
HtmlTag = '<' Spnl '/'? AlphanumericAscii+ Spnl HtmlAttribute* '/'? Spnl '>'
|
||||||
Eof = !.
|
Eof = !.
|
||||||
Spacechar = ' ' | '\t'
|
Spacechar = ' ' | '\t'
|
||||||
Nonspacechar = !Spacechar !Newline .
|
Nonspacechar = !Spacechar !Newline .
|
||||||
@ -639,7 +639,9 @@ Sp = Spacechar*
|
|||||||
Spnl = Sp (Newline Sp)?
|
Spnl = Sp (Newline Sp)?
|
||||||
SpecialChar = '*' | '_' | '`' | '&' | '[' | ']' | '<' | '!' | '\\' | ExtendedSpecialChar
|
SpecialChar = '*' | '_' | '`' | '&' | '[' | ']' | '<' | '!' | '\\' | ExtendedSpecialChar
|
||||||
NormalChar = !( SpecialChar | Spacechar | Newline ) .
|
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]
|
Digit = [0-9]
|
||||||
|
|
||||||
HexEntity = < '&' '#' [Xx] [0-9a-fA-F]+ ';' >
|
HexEntity = < '&' '#' [Xx] [0-9a-fA-F]+ ';' >
|
||||||
@ -686,7 +688,7 @@ EmDash = ("---" | "--")
|
|||||||
|
|
||||||
SingleQuoteStart = '\'' ![)!\],.;:-? \t\n] !( ( "s" | "t" | "m" | "ve" | "ll" | "re" ) !Alphanumeric )
|
SingleQuoteStart = '\'' ![)!\],.;:-? \t\n] !( ( "s" | "t" | "m" | "ve" | "ll" | "re" ) !Alphanumeric )
|
||||||
|
|
||||||
SingleQuoteEnd = '\'' !Alphanumeric
|
SingleQuoteEnd = '\'' &NonAlphanumeric
|
||||||
|
|
||||||
SingleQuoted = SingleQuoteStart
|
SingleQuoted = SingleQuoteStart
|
||||||
a:StartList
|
a:StartList
|
||||||
|
Loading…
Reference in New Issue
Block a user