aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/ConTeXt.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-11-16 17:20:17 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-16 17:31:47 -0800
commit8683cb596da0a1b0081744cc828c03d5f9460d5b (patch)
tree6bbe9fcfddb47f2a4d624fc34181869eb89f8fb6 /src/Text/Pandoc/Writers/ConTeXt.hs
parentc4e198c84d3c3ff499893962f37a5b5ea8462626 (diff)
downloadpandoc-8683cb596da0a1b0081744cc828c03d5f9460d5b.tar.gz
ConTeXt writer: use braces, not start/stop, for inline language tags.
This prevents unwanted gobbling of spaces.
Diffstat (limited to 'src/Text/Pandoc/Writers/ConTeXt.hs')
-rw-r--r--src/Text/Pandoc/Writers/ConTeXt.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs
index 2ec86fd78..64092dc6b 100644
--- a/src/Text/Pandoc/Writers/ConTeXt.hs
+++ b/src/Text/Pandoc/Writers/ConTeXt.hs
@@ -470,8 +470,8 @@ inlineToConTeXt (Span (_,_,kvs) ils) = do
Just "ltr" -> braces $ "\\lefttoright " <> txt
_ -> txt
wrapLang txt = case mblang of
- Just lng -> "\\start\\language[" <> literal lng
- <> "]" <> txt <> "\\stop "
+ Just lng -> braces ("\\language" <>
+ brackets (literal lng) <> txt)
Nothing -> txt
(wrapLang . wrapDir) <$> inlineListToConTeXt ils