git.iko.soy/typeable/pandoc
on master help sign in
ConTeXt writer: use braces, not start/stop, for inline language tags.
8683cb5John MacFarlane
src/Text/Pandoc/Writers/ConTeXt.hs+2−2
@@ -470,8 +470,8 @@ inlineToConTeXt (Span (_,_,kvs) ils) = do
470 Just "ltr" -> braces $ "\\lefttoright " <> txt
470 Just "ltr" -> braces $ "\\lefttoright " <> txt
471 _ -> txt
471 _ -> txt
472 wrapLang txt = case mblang of
472 wrapLang txt = case mblang of
473− Just lng -> "\\start\\language[" <> literal lng
473+ Just lng -> braces ("\\language" <>
474− <> "]" <> txt <> "\\stop "
474+ brackets (literal lng) <> txt)
475 Nothing -> txt
475 Nothing -> txt
476 (wrapLang . wrapDir) <$> inlineListToConTeXt ils
476 (wrapLang . wrapDir) <$> inlineListToConTeXt ils
477
477
test/writers-lang-and-dir.context+6−7
@@ -98,10 +98,10 @@ German div contents
98
98
99and more text.
99and more text.
100
100
101−Next paragraph with a \start\language[en-gb]British span\stop and a
101+Next paragraph with a {\language[en-gb]British span} and a
102−word-that-includesa\start\language[de-ch]Swiss German span\stop right?
102+word-that-includesa{\language[de-ch]Swiss German span}right?
103
103
104−Some \start\language[es]Spanish text\stop .
104+Some {\language[es]Spanish text}.
105
105
106\section[title={Combined},reference={combined}]
106\section[title={Combined},reference={combined}]
107
107
@@ -116,9 +116,8 @@ French rtl div contents
116
116
117and more text.
117and more text.
118
118
119−Next paragraph with a \start\language[en-gb]{\lefttoright British ltr
119+Next paragraph with a {\language[en-gb]{\lefttoright British ltr span}}
120−span}\stop and a
121−word-that-includesa\start\language[de-ch]{\lefttoright Swiss German ltr
120+and a word-that-includesa{\language[de-ch]{\lefttoright Swiss German ltr
122−span}\stop right?
121+span}}right?
123
122
124\stoptext
123\stoptext