aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 413b71659..262d4fb50 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -437,12 +437,15 @@ stringStartsWithSpace [] = False
fixOrEscape :: Bool -> Inline -> Bool
fixOrEscape sp (Str "-") = sp
-fixOrEscape sp (Str ";") = not sp
-fixOrEscape _ (Str ">") = True
+fixOrEscape sp (Str s@('-':x:_)) = (sp && isSpace x) || isHorizontalRule s
+fixOrEscape sp (Str (";")) = not sp
+fixOrEscape sp (Str (';':x:_)) = not sp && isSpace x
+fixOrEscape _ (Str (">")) = True
+fixOrEscape _ (Str ('>':x:_)) = isSpace x
fixOrEscape sp (Str s) = (sp && (startsWithMarker isDigit s ||
startsWithMarker isAsciiLower s ||
startsWithMarker isAsciiUpper s))
- || isHorizontalRule s || stringStartsWithSpace s
+ || stringStartsWithSpace s
fixOrEscape _ Space = True
fixOrEscape _ SoftBreak = True
fixOrEscape _ _ = False