git.iko.soy/typeable/pandoc
on master help sign in
Org reader: prefer plain symbols over math symbols
33e2d46Albert Krewinkel
src/Text/Pandoc/Readers/Org/Inlines.hs+1−1
@@ -791,7 +791,7 @@ inlineLaTeX = try $ do
791 cmd <- inlineLaTeXCommand
791 cmd <- inlineLaTeXCommand
792 ils <- (lift . lift) $ parseAsInlineLaTeX cmd
792 ils <- (lift . lift) $ parseAsInlineLaTeX cmd
793 maybe mzero returnF $
793 maybe mzero returnF $
794− parseAsMath cmd `mplus` parseAsMathMLSym cmd `mplus` ils
794+ parseAsMathMLSym cmd `mplus` parseAsMath cmd `mplus` ils
795 where
795 where
796 parseAsMath :: String -> Maybe Inlines
796 parseAsMath :: String -> Maybe Inlines
797 parseAsMath cs = B.fromList <$> texMathToPandoc cs
797 parseAsMath cs = B.fromList <$> texMathToPandoc cs
test/Tests/Readers/Org/Inline.hs+7−3
@@ -328,9 +328,13 @@ tests =
328 "\\emph{Emphasis mine}" =?>
328 "\\emph{Emphasis mine}" =?>
329 para (emph "Emphasis mine")
329 para (emph "Emphasis mine")
330
330
331− , "Inline LaTeX math symbol" =:
331+ , "Inline math symbols" =:
332− "\\tau" =?>
332+ "\\tau \\oplus \\alpha" =?>
333− para (emph "τ")
333+ para "τ ⊕ α"
334+
335+ , "Inline LaTeX math command" =:
336+ "\\crarr" =?>
337+ para "↵"
334
338
335 , "Unknown inline LaTeX command" =:
339 , "Unknown inline LaTeX command" =:
336 "\\notacommand{foo}" =?>
340 "\\notacommand{foo}" =?>