summaryrefslogtreecommitdiff
path: root/Pancake.hs
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-11-03 05:42:37 +0300
committerdefanor <defanor@uberspace.net>2017-11-03 05:42:37 +0300
commit6ebaa972a88ddf93e5c83b6941057698b4bd6243 (patch)
tree44fa39cd83b224797628c266772406b91a800a41 /Pancake.hs
parentdf79c998b82f4f2aa372128e2aa9fbf175f7a917 (diff)
Escape newline characters in embedded mode
Inline math may contain those.
Diffstat (limited to 'Pancake.hs')
-rw-r--r--Pancake.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/Pancake.hs b/Pancake.hs
index 6c845d5..770b862 100644
--- a/Pancake.hs
+++ b/Pancake.hs
@@ -636,6 +636,7 @@ showSexps ro =
encodeStr s = concat ["\"", concatMap escape s, "\""]
escape '\\' = "\\\\"
escape '"' = "\\\""
+ escape '\n' = "\\n"
escape other = pure other
showSexp :: Styled -> String
showSexp (Plain s) = encodeStr s