aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-09-09 13:11:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-09-09 13:11:53 -0700
commit0b486e867264c2bac02226766055b05d3c51de7e (patch)
tree79553a432d0f47260862c182061df32751c483e8
parent12cec8f08233ea5836af77aff27771b800a35ce7 (diff)
downloadpandoc-0b486e867264c2bac02226766055b05d3c51de7e.tar.gz
Org writer: don't escape literal `_`, `^`.
Org doesn't recognize these escapes. Closes #4882.
-rw-r--r--src/Text/Pandoc/Writers/Org.hs2
-rw-r--r--test/writer.org8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs
index 1dd825b79..12a54fd71 100644
--- a/src/Text/Pandoc/Writers/Org.hs
+++ b/src/Text/Pandoc/Writers/Org.hs
@@ -109,7 +109,7 @@ escapeString = escapeStringUsing $
, ('\x2013',"--")
, ('\x2019',"'")
, ('\x2026',"...")
- ] ++ backslashEscapes "^_"
+ ]
isRawFormat :: Format -> Bool
isRawFormat f =
diff --git a/test/writer.org b/test/writer.org
index 1ae0ca8f3..32fcfc404 100644
--- a/test/writer.org
+++ b/test/writer.org
@@ -584,7 +584,7 @@ Superscripts: a^{bc}d a^{/hello/} a^{hello there}.
Subscripts: H_{2}O, H_{23}O, H_{many of them}O.
These should not be superscripts or subscripts, because of the unescaped
-spaces: a\^b c\^d, a~b c~d.
+spaces: a^b c^d, a~b c~d.
--------------
@@ -674,7 +674,7 @@ Backtick: `
Asterisk: *
-Underscore: \_
+Underscore: _
Left brace: {
@@ -724,7 +724,7 @@ Just a [[/url/][URL]].
[[/url/][URL and title]]
-[[/url/with_underscore][with\_underscore]]
+[[/url/with_underscore][with_underscore]]
[[mailto:nobody@nowhere.net][Email link]]
@@ -816,7 +816,7 @@ Here is a movie [[file:movie.jpg]] icon.
:END:
Here is a footnote reference,[fn:1] and another.[fn:2] This should /not/ be a
-footnote reference, because it contains a space.[\^my note] Here is an inline
+footnote reference, because it contains a space.[^my note] Here is an inline
note.[fn:3]
#+BEGIN_QUOTE