mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
HTML writer: don't add variation selector if it's already there.
See f11d0c9dc8
This fixes round-trip failures.
This commit is contained in:
@@ -109,7 +109,10 @@ strToHtml :: String -> Html
|
||||
strToHtml ('\'':xs) = preEscapedString "\'" `mappend` strToHtml xs
|
||||
strToHtml ('"' :xs) = preEscapedString "\"" `mappend` strToHtml xs
|
||||
strToHtml (x:xs) | needsVariationSelector x
|
||||
= preEscapedString [x, '\xFE0E'] `mappend` strToHtml xs
|
||||
= preEscapedString [x, '\xFE0E'] `mappend`
|
||||
case xs of
|
||||
('\xFE0E':ys) -> strToHtml ys
|
||||
_ -> strToHtml xs
|
||||
strToHtml xs@(_:_) = case break (\c -> c == '\'' || c == '"' ||
|
||||
needsVariationSelector c) xs of
|
||||
(_ ,[]) -> toHtml xs
|
||||
|
||||
Reference in New Issue
Block a user