Textile reader: Avoid parsing dashes as strikeout.

Previously the input

    text--
    text--
    text--
    text--

would be parsed with strikeouts rather than dashes. This fixes
the problem by requiring that a strikeout delimiting - not be
followed by a -.

Closes #631.
This commit is contained in:
John MacFarlane 2012-09-28 23:37:41 -04:00
parent 632fd49d07
commit ae68836352

View file

@ -374,7 +374,7 @@ inlineMarkup = choice [ simpleInline (string "??") (Cite [])
, simpleInline (char '*') Strong
, simpleInline (char '_') Emph
, simpleInline (char '+') Emph -- approximates underline
, simpleInline (char '-') Strikeout
, simpleInline (char '-' <* notFollowedBy (char '-')) Strikeout
, simpleInline (char '^') Superscript
, simpleInline (char '~') Subscript
]