HTML writer: don't add variation selector if it's already there.
See f11d0c9dc8
This fixes round-trip failures.
This commit is contained in:
parent
fee3258280
commit
545da6113c
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue