git.iko.soy/typeable/pandoc
on master help sign in
Org writer: Fix output for linebreaks

Hard linebreaks in Org mode are represented by the string "\\" as the last characters in a line. Adds this feature to the Org-mode writer.

commit36066699c31ca50566ca2492a5c112ecbe690a63 authorAlbert Krewinkel <tarleb@moltkeplatz.de> dateSat 12 Apr 2014, 00:22 (13 years ago) parent8bc09ce
2 files changed+2−2
src/Text/Pandoc/Writers/Org.hs+1−1 tests/writer.org+1−1
src/Text/Pandoc/Writers/Org.hs+1−1
@@ -271,7 +271,7 @@ inlineToOrg (Math t str) = do
271271 else "$$" <> text str <> "$$"
272272inlineToOrg (RawInline f str) | f == "tex" || f == "latex" = return $ text str
273273inlineToOrg (RawInline _ _) = return empty
274−inlineToOrg (LineBreak) = return cr -- there's no line break in Org
274+inlineToOrg (LineBreak) = return (text "\\\\" <> cr)
275275inlineToOrg Space = return space
276276inlineToOrg (Link txt (src, _)) = do
277277 case txt of
tests/writer.org+1−1
@@ -42,7 +42,7 @@ item.
4242
4343Here's one with a bullet. * criminey.
4444
45−There should be a hard line break
45+There should be a hard line break\\
4646here.
4747
4848--------------