git.iko.soy/typeable/pandoc
on master help sign in
Org writer: don't escape literal `_`, `^`.

Org doesn't recognize these escapes. Closes #4882.

commit0b486e867264c2bac02226766055b05d3c51de7e authorJohn MacFarlane <jgm@berkeley.edu> dateSun 9 Sep 2018, 13:11 (8 years ago) parent12cec8f
2 files changed+5−5
src/Text/Pandoc/Writers/Org.hs+1−1 test/writer.org+4−4
src/Text/Pandoc/Writers/Org.hs+1−1
@@ -109,7 +109,7 @@ escapeString = escapeStringUsing $
109109 , ('\x2013',"--")
110110 , ('\x2019',"'")
111111 , ('\x2026',"...")
112− ] ++ backslashEscapes "^_"
112+ ]
113113
114114isRawFormat :: Format -> Bool
115115isRawFormat f =
test/writer.org+4−4
@@ -584,7 +584,7 @@ Superscripts: a^{bc}d a^{/hello/} a^{hello there}.
584584Subscripts: H_{2}O, H_{23}O, H_{many of them}O.
585585
586586These should not be superscripts or subscripts, because of the unescaped
587−spaces: a\^b c\^d, a~b c~d.
587+spaces: a^b c^d, a~b c~d.
588588
589589--------------
590590
@@ -674,7 +674,7 @@ Backtick: `
674674
675675Asterisk: *
676676
677−Underscore: \_
677+Underscore: _
678678
679679Left brace: {
680680
@@ -724,7 +724,7 @@ Just a [[/url/][URL]].
724724
725725[[/url/][URL and title]]
726726
727−[[/url/with_underscore][with\_underscore]]
727+[[/url/with_underscore][with_underscore]]
728728
729729[[mailto:nobody@nowhere.net][Email link]]
730730
@@ -816,7 +816,7 @@ Here is a movie [[file:movie.jpg]] icon.
816816 :END:
817817
818818Here is a footnote reference,[fn:1] and another.[fn:2] This should /not/ be a
819−footnote reference, because it contains a space.[\^my note] Here is an inline
819+footnote reference, because it contains a space.[^my note] Here is an inline
820820note.[fn:3]
821821
822822#+BEGIN_QUOTE