git.iko.soy/typeable/pandoc
on master help sign in
Use [] for superscripts and subscripts in textile writer.
commit71c9316a597298415a7d4cb7f758b523ac9339cd authorJohn MacFarlane <jgm@berkeley.edu> dateSat 27 Nov 2010, 10:44 (16 years ago) parentcae3f8e
2 files changed+4−4
src/Text/Pandoc/Writers/Textile.hs+2−2 tests/writer.textile+2−2
src/Text/Pandoc/Writers/Textile.hs+2−2
@@ -344,13 +344,13 @@ inlineToTextile opts (Superscript lst) = do
344344 contents <- inlineListToTextile opts lst
345345 return $ if '^' `elem` contents
346346 then "<sup>" ++ contents ++ "</sup>"
347− else "^" ++ contents ++ "^"
347+ else "[^" ++ contents ++ "^]"
348348
349349inlineToTextile opts (Subscript lst) = do
350350 contents <- inlineListToTextile opts lst
351351 return $ if '~' `elem` contents
352352 then "<sub>" ++ contents ++ "</sub>"
353− else "~" ++ contents ++ "~"
353+ else "[~" ++ contents ++ "~]"
354354
355355inlineToTextile opts (SmallCaps lst) = inlineListToTextile opts lst
356356
tests/writer.textile+2−2
@@ -450,9 +450,9 @@ This is code: @&gt;@, @$@, @\@, @\$@, @&lt;html&gt;@.
450450
451451-This is _strikeout_.-
452452
453−Superscripts: a^bc^d a^_hello_^ a^hello there^.
453+Superscripts: a[^bc^]d a[^_hello_^] a[^hello there^].
454454
455−Subscripts: H~2~O, H~23~O, H~many of them~O.
455+Subscripts: H[~2~]O, H[~23~]O, H[~many of them~]O.
456456
457457These should not be superscripts or subscripts, because of the unescaped spaces: a^b c^d, a~b c~d.
458458