git.iko.soy/typeable/pandoc
on master help sign in
Fix for #4171 fix: don't wrap note references after SoftBreak
ef8430eAlexander Krotov
src/Text/Pandoc/Writers/Org.hs+2
@@ -312,6 +312,8 @@ inlineListToOrg lst = hcat <$> mapM inlineToOrg (fixNotes lst)
312 where fixNotes [] = [] -- prevent note ref from wrapping, see #4171
312 where fixNotes [] = [] -- prevent note ref from wrapping, see #4171
313 fixNotes (Space : n@Note{} : rest) =
313 fixNotes (Space : n@Note{} : rest) =
314 Str " " : n : fixNotes rest
314 Str " " : n : fixNotes rest
315+ fixNotes (SoftBreak : n@Note{} : rest) =
316+ Str " " : n : fixNotes rest
315 fixNotes (x : rest) = x : fixNotes rest
317 fixNotes (x : rest) = x : fixNotes rest
316
318
317-- | Convert Pandoc inline element to Org.
319-- | Convert Pandoc inline element to Org.
test/command/4171.md+14
@@ -9,3 +9,17 @@ a
9
9
10[fn:1] b
10[fn:1] b
11```
11```
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+```