@@ -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