aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-04-10 23:38:30 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-04-10 23:38:30 +0300
commit782ab73aa350ca323b0b7786770e37d1a932f9a8 (patch)
tree0312c568dafa224933365b342b1dd62354fb30fe /src
parent72878adc63f6a1e5178734aab499c3cd10df6016 (diff)
downloadpandoc-782ab73aa350ca323b0b7786770e37d1a932f9a8.tar.gz
Muse writer: escape > less often
> should be escaped only when it can start verse, i.e., at the beginning of the line.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 0cfc2b8c4..127a4f149 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -324,7 +324,7 @@ containsFootnotes st =
conditionalEscapeString :: Bool -> String -> String
conditionalEscapeString isInsideLinkDescription s =
- if any (`elem` ("#*<=>|" :: String)) s ||
+ if any (`elem` ("#*<=|" :: String)) s ||
"::" `isInfixOf` s ||
"~~" `isInfixOf` s ||
"[[" `isInfixOf` s ||
@@ -403,6 +403,7 @@ isHorizontalRule s =
fixOrEscape :: Bool -> Inline -> Bool
fixOrEscape sp (Str "-") = sp
fixOrEscape sp (Str ";") = not sp
+fixOrEscape _ (Str ">") = True
fixOrEscape sp (Str s) = (sp && (startsWithMarker isDigit s ||
startsWithMarker isAsciiLower s ||
startsWithMarker isAsciiUpper s))