git.iko.soy/typeable/pandoc
on master help sign in
Muse writer: use unicode quotes for quoted text
commit9131d62c9b9a70829e0d938d0d201a09b2cec179 authorAlexander Krotov <ilabdsf@gmail.com> dateWed 14 Feb 2018, 13:49 (9 years ago) parent6dcb974
3 files changed+14−14
src/Text/Pandoc/Writers/Muse.hs+2−2 test/Tests/Writers/Muse.hs+4−4 test/writer.muse+8−8
src/Text/Pandoc/Writers/Muse.hs+2−2
@@ -353,10 +353,10 @@ inlineToMuse (Subscript lst) = do
353353inlineToMuse (SmallCaps lst) = inlineListToMuse lst
354354inlineToMuse (Quoted SingleQuote lst) = do
355355 contents <- inlineListToMuse lst
356− return $ "'" <> contents <> "'"
356+ return $ "‘" <> contents <> "’"
357357inlineToMuse (Quoted DoubleQuote lst) = do
358358 contents <- inlineListToMuse lst
359− return $ "\"" <> contents <> "\""
359+ return $ "“" <> contents <> "”"
360360-- Amusewiki does not support <cite> tag,
361361-- and Emacs Muse citation support is limited
362362-- (https://www.gnu.org/software/emacs-muse/manual/html_node/Citations.html#Citation)
test/Tests/Writers/Muse.hs+4−4
@@ -311,8 +311,8 @@ tests = [ testGroup "block elements"
311311 , "superscript" =: superscript (text "foo") =?> "<sup>foo</sup>"
312312 , "subscript" =: subscript (text "foo") =?> "<sub>foo</sub>"
313313 , "smallcaps" =: smallcaps (text "foo") =?> "foo"
314− , "single quoted" =: singleQuoted (text "foo") =?> "'foo'"
315− , "double quoted" =: doubleQuoted (text "foo") =?> "\"foo\""
314+ , "single quoted" =: singleQuoted (text "foo") =?> "‘foo’"
315+ , "double quoted" =: doubleQuoted (text "foo") =?> "“foo”"
316316 -- Cite is trivial
317317 , testGroup "code"
318318 [ "simple" =: code "foo" =?> "<code>foo</code>"
@@ -370,7 +370,7 @@ tests = [ testGroup "block elements"
370370 "<em>foo</em>bar"
371371 , "emph quoted" =:
372372 para (doubleQuoted (emph (text "foo"))) =?>
373− "\"<em>foo</em>\""
373+ "“<em>foo</em>”"
374374 , "strong word before" =:
375375 para (text "foo" <> strong (text "bar")) =?>
376376 "foo<strong>bar</strong>"
@@ -379,7 +379,7 @@ tests = [ testGroup "block elements"
379379 "<strong>foo</strong>bar"
380380 , "strong quoted" =:
381381 para (singleQuoted (strong (text "foo"))) =?>
382− "'<strong>foo</strong>'"
382+ "‘<strong>foo</strong>’"
383383 ]
384384 ]
385385 ]
test/writer.muse+8−8
@@ -492,16 +492,16 @@ spaces: a^b c^d, a~b c~d.
492492
493493* Smart quotes, ellipses, dashes
494494
495−"Hello," said the spider. "'Shelob' is my name."
495+“Hello,” said the spider. “‘Shelob’ is my name.”
496496
497−'A', 'B', and 'C' are letters.
497+‘A’, ‘B’, and ‘C’ are letters.
498498
499−'Oak,' 'elm,' and 'beech' are names of trees. So is 'pine.'
499+‘Oak,’ ‘elm,’ and ‘beech’ are names of trees. So is ‘pine.’
500500
501−'He said, "I want to go."' Were you alive in the 70’s?
501+‘He said, “I want to go.”’ Were you alive in the 70’s?
502502
503−Here is some quoted '<code>code</code>' and a
504−"[[http://example.com/?foo=1&bar=2][quoted link]]".
503+Here is some quoted ‘<code>code</code>’ and a
504+“[[http://example.com/?foo=1&bar=2][quoted link]]”.
505505
506506Some dashes: one—two — three—four — five.
507507
@@ -527,7 +527,7 @@ Ellipses…and…and….
527527These shouldn’t be math:
528528
529529 - To get the famous equation, write <code>$e = mc^2$</code>.
530− - $22,000 is a <em>lot</em> of money. So is $34,000. (It worked if "lot" is
530+ - $22,000 is a <em>lot</em> of money. So is $34,000. (It worked if “lot” is
531531 emphasized.)
532532 - Shoes ($20) and socks ($5).
533533 - Escaped <code>$</code>: $73 <em>this should be emphasized</em> 23$.
@@ -679,7 +679,7 @@ or here: <http://example.com/>
679679
680680* Images
681681
682−From "Voyage dans la Lune" by Georges Melies (1902):
682+From “Voyage dans la Lune” by Georges Melies (1902):
683683
684684[[lalune.jpg][Voyage dans la Lune]]
685685