diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-01-29 23:27:40 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-01-30 00:33:02 +0300 |
commit | 9ff8bc64f9c873e2bcae6a1a46f71af9287d6753 (patch) | |
tree | 5dd6f3c10d5e9626da153f3dfb4e520f7aa18e11 /src/Text | |
parent | b7d8930dc097defcae754120a4fa0d6727c9b265 (diff) | |
download | pandoc-9ff8bc64f9c873e2bcae6a1a46f71af9287d6753.tar.gz |
Muse writer: don't wrap displayMath into <verse>
<verse> is a block tag and displayMath is an inline element.
Writing <verse> around displayMath could result in nested
<verse> tags.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Muse.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 73d79a9a2..c3c1c3120 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -363,11 +363,8 @@ inlineToMuse (Quoted DoubleQuote lst) = do inlineToMuse (Cite _ lst) = inlineListToMuse lst inlineToMuse (Code _ str) = return $ "<code>" <> text (substitute "</code>" "<</code><code>/code>" str) <> "</code>" -inlineToMuse (Math InlineMath str) = - lift (texMathToInlines InlineMath str) >>= inlineListToMuse -inlineToMuse (Math DisplayMath str) = do - contents <- lift (texMathToInlines DisplayMath str) >>= inlineListToMuse - return $ "<verse>" <> contents <> "</verse>" <> blankline +inlineToMuse (Math t str) = + lift (texMathToInlines t str) >>= inlineListToMuse inlineToMuse (RawInline (Format f) str) = return $ "<literal style=\"" <> text f <> "\">" <> text str <> "</literal>" inlineToMuse LineBreak = return $ "<br>" <> cr |