git.iko.soy/typeable/pandoc
on master help sign in
Ms writer - removed old escapeBar.

We don't need this now that we use @ for delim.

commitf1c476fe3c98a8fd0fd9005ddf24fa1b0172a917 authorJohn MacFarlane <jgm@berkeley.edu> dateWed 24 Oct 2018, 09:12 (8 years ago) parent3a9f807
1 file changed+2−8
src/Text/Pandoc/Writers/Ms.hs+2−8
src/Text/Pandoc/Writers/Ms.hs+2−8
@@ -112,12 +112,6 @@ escapeStr opts =
112112escapeUri :: String -> String
113113escapeUri = escapeURIString (\c -> c /= '@' && isAllowedInURI c)
114114
115−-- | Escape | character, used to mark inline math, inside math.
116−escapeBar :: String -> String
117−escapeBar = concatMap go
118− where go '|' = "\\[ba]"
119− go c = [c]
120−
121115toSmallCaps :: WriterOptions -> String -> String
122116toSmallCaps _ [] = []
123117toSmallCaps opts (c:cs)
@@ -416,7 +410,7 @@ inlineToMs opts (Math InlineMath str) = do
416410 res <- convertMath writeEqn InlineMath str
417411 case res of
418412 Left il -> inlineToMs opts il
419− Right r -> return $ text "@" <> text (escapeBar r) <> text "@"
413+ Right r -> return $ text "@" <> text r <> text "@"
420414inlineToMs opts (Math DisplayMath str) = do
421415 res <- convertMath writeEqn InlineMath str
422416 case res of
@@ -424,7 +418,7 @@ inlineToMs opts (Math DisplayMath str) = do
424418 contents <- inlineToMs opts il
425419 return $ cr <> text ".RS" $$ contents $$ text ".RE"
426420 Right r -> return $
427− cr <> text ".EQ" $$ text (escapeBar r) $$ text ".EN"
421+ cr <> text ".EQ" $$ text r $$ text ".EN"
428422inlineToMs _ il@(RawInline f str)
429423 | f == Format "ms" = return $ text str
430424 | otherwise = do