aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs2
-rw-r--r--test/Tests/Readers/Muse.hs2
-rw-r--r--test/Tests/Writers/Muse.hs3
-rw-r--r--test/writer.muse15
4 files changed, 10 insertions, 12 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 3a5eefc18..c834e5883 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -328,7 +328,7 @@ inlineToMuse (Quoted DoubleQuote lst) = do
-- so just fallback to expanding inlines.
inlineToMuse (Cite _ lst) = inlineListToMuse lst
inlineToMuse (Code _ str) = return $
- "<code>" <> text (conditionalEscapeString str) <> "</code>"
+ "<code>" <> text (substitute "</code>" "<</code><code>/code>" str) <> "</code>"
inlineToMuse (Math InlineMath str) =
lift (texMathToInlines InlineMath str) >>= inlineListToMuse
inlineToMuse (Math DisplayMath str) = do
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 0202dfb6d..a0362b80c 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -123,6 +123,8 @@ tests =
, "Verbatim tag" =: "*<verbatim>*</verbatim>*" =?> para (emph "*")
+ , "Verbatim inside code" =: "<code><verbatim>foo</verbatim></code>" =?> para (code "<verbatim>foo</verbatim>")
+
, testGroup "Links"
[ "Link without description" =:
"[[https://amusewiki.org/]]" =?>
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index a6c1edc3b..7e95ae85e 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -296,8 +296,7 @@ tests = [ testGroup "block elements"
-- Cite is trivial
, testGroup "code"
[ "simple" =: code "foo" =?> "<code>foo</code>"
- , "escape lightweight markup" =: code "foo = bar" =?> "<code><verbatim>foo = bar</verbatim></code>"
- , "escape tag" =: code "<code>foo = bar</code> baz" =?> "<code><verbatim><code>foo = bar</code> baz</verbatim></code>"
+ , "escape tag" =: code "<code>foo = bar</code> baz" =?> "<code><code>foo = bar<</code><code>/code> baz</code>"
]
, testGroup "spaces"
[ "space" =: text "a" <> space <> text "b" =?> "a b"
diff --git a/test/writer.muse b/test/writer.muse
index 6ba3beb90..6c9dd9869 100644
--- a/test/writer.muse
+++ b/test/writer.muse
@@ -478,8 +478,8 @@ So is <strong><em>this</em></strong> word.
So is <strong><em>this</em></strong> word.
-This is code: <code><verbatim>></verbatim></code>, <code>$</code>,
-<code>\</code>, <code>\$</code>, <code><verbatim><html></verbatim></code>.
+This is code: <code>></code>, <code>$</code>, <code>\</code>, <code>\$</code>,
+<code><html></code>.
<del>This is <em>strikeout</em>.</del>
@@ -529,8 +529,7 @@ Ellipses…and…and….
These shouldn’t be math:
- - To get the famous equation, write
- <code><verbatim>$e = mc^2$</verbatim></code>.
+ - To get the famous equation, write <code>$e = mc^2$</code>.
- $22,000 is a <em>lot</em> of money. So is $34,000. (It worked if "lot" is
emphasized.)
- Shoes ($20) and socks ($5).
@@ -673,8 +672,7 @@ An e-mail address: [[mailto:nobody@nowhere.net][nobody@nowhere.net]]
Blockquoted: [[http://example.com/]]
</quote>
-Auto-links should not occur here:
-<code><verbatim><http://example.com/></verbatim></code>
+Auto-links should not occur here: <code><http://example.com/></code>
<example>
or here: <http://example.com/>
@@ -722,9 +720,8 @@ This paragraph should not be part of the note, as it is not indented.
indent the first line of each block.
[3] This is <em>easier</em> to type. Inline notes may contain
- [[http://google.com][links]] and <code><verbatim>]</verbatim></code>
- verbatim characters, as well as <verbatim>[bracketed</verbatim>
- <verbatim>text].</verbatim>
+ [[http://google.com][links]] and <code>]</code> verbatim characters, as
+ well as <verbatim>[bracketed</verbatim> <verbatim>text].</verbatim>
[4] In quote.