git.iko.soy/typeable/pandoc
on master help sign in
Fix for #4171 fix: don't wrap note references after SoftBreak
commitef8430e70269d0332f802986c9ef570faad8faa0 authorAlexander Krotov <ilabdsf@gmail.com> dateTue 19 Dec 2017, 13:16 (9 years ago) parent46d3c95
2 files changed+16
src/Text/Pandoc/Writers/Org.hs+2 test/command/4171.md+14
src/Text/Pandoc/Writers/Org.hs+2
@@ -312,6 +312,8 @@ inlineListToOrg lst = hcat <$> mapM inlineToOrg (fixNotes lst)
312312 where fixNotes [] = [] -- prevent note ref from wrapping, see #4171
313313 fixNotes (Space : n@Note{} : rest) =
314314 Str " " : n : fixNotes rest
315+ fixNotes (SoftBreak : n@Note{} : rest) =
316+ Str " " : n : fixNotes rest
315317 fixNotes (x : rest) = x : fixNotes rest
316318
317319-- | Convert Pandoc inline element to Org.
test/command/4171.md+14
@@ -9,3 +9,17 @@ a
99
1010[fn:1] b
1111```
12+
13+
14+```
15+% pandoc -f org -t org
16+Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
17+ [fn:1] a
18+
19+[fn:1] b
20+^D
21+Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa [fn:1]
22+a
23+
24+[fn:1] b
25+```