From 782ab73aa350ca323b0b7786770e37d1a932f9a8 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Tue, 10 Apr 2018 23:38:30 +0300 Subject: Muse writer: escape > less often > should be escaped only when it can start verse, i.e., at the beginning of the line. --- src/Text/Pandoc/Writers/Muse.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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)) -- cgit v1.2.3