Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tarleb committed Apr 12, 2014
1 parent 8bc09ce commit 3606669
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Writers/Org.hs
Expand Up @@ -271,7 +271,7 @@ inlineToOrg (Math t str) = do
else "$$" <> text str <> "$$"
inlineToOrg (RawInline f str) | f == "tex" || f == "latex" = return $ text str
inlineToOrg (RawInline _ _) = return empty
inlineToOrg (LineBreak) = return cr -- there's no line break in Org
inlineToOrg (LineBreak) = return (text "\\\\" <> cr)
inlineToOrg Space = return space
inlineToOrg (Link txt (src, _)) = do
case txt of
Expand Down
2 changes: 1 addition & 1 deletion tests/writer.org
Expand Up @@ -42,7 +42,7 @@ item.

Here's one with a bullet. * criminey.

There should be a hard line break
There should be a hard line break\\
here.

--------------
Expand Down

0 comments on commit 3606669

Please sign in to comment.