git.iko.soy/typeable/pandoc
on master help sign in
Org writer: prefix footnote numbers with `fn:`

Unprefixed numbers where used by older org-mode versions, but are no longer supported.

commitd27188ad309feb9a76f6dc3d816ad78722078fe1 authorAlbert Krewinkel <albert@zeitkraut.de> dateWed 21 Dec 2016, 23:43 (10 years ago) parentb5ce963
2 files changed+21−21
src/Text/Pandoc/Writers/Org.hs+2−2 tests/writer.org+19−19
src/Text/Pandoc/Writers/Org.hs+2−2
@@ -92,7 +92,7 @@ notesToOrg notes =
9292noteToOrg :: Int -> [Block] -> State WriterState Doc
9393noteToOrg num note = do
9494 contents <- blockListToOrg note
95− let marker = "[" ++ show num ++ "] "
95+ let marker = "[fn:" ++ show num ++ "] "
9696 return $ hang (length marker) (text marker) contents
9797
9898-- | Escape special characters for Org.
@@ -373,7 +373,7 @@ inlineToOrg (Note contents) = do
373373 notes <- get >>= (return . stNotes)
374374 modify $ \st -> st { stNotes = contents:notes }
375375 let ref = show $ (length notes) + 1
376− return $ "[" <> text ref <> "]"
376+ return $ "[fn:" <> text ref <> "]"
377377
378378orgPath :: String -> String
379379orgPath src =
tests/writer.org+19−19
@@ -819,37 +819,37 @@ Here is a movie [[file:movie.jpg]] icon.
819819 :CUSTOM_ID: footnotes
820820 :END:
821821
822−Here is a footnote reference,[1] and another.[2] This should /not/ be a
822+Here is a footnote reference,[fn:1] and another.[fn:2] This should /not/ be a
823823footnote reference, because it contains a space.[\^my note] Here is an inline
824−note.[3]
824+note.[fn:3]
825825
826826#+BEGIN_QUOTE
827− Notes can go in quotes.[4]
827+ Notes can go in quotes.[fn:4]
828828#+END_QUOTE
829829
830−1. And in list items.[5]
830+1. And in list items.[fn:5]
831831
832832This paragraph should not be part of the note, as it is not indented.
833833
834−[1] Here is the footnote. It can go anywhere after the footnote reference. It
835− need not be placed at the end of the document.
834+[fn:1] Here is the footnote. It can go anywhere after the footnote reference.
835+ It need not be placed at the end of the document.
836836
837−[2] Here's the long note. This one contains multiple blocks.
837+[fn:2] Here's the long note. This one contains multiple blocks.
838838
839− Subsequent blocks are indented to show that they belong to the footnote
840− (as with list items).
839+ Subsequent blocks are indented to show that they belong to the footnote
840+ (as with list items).
841841
842− #+BEGIN_EXAMPLE
843− { <code> }
844− #+END_EXAMPLE
842+ #+BEGIN_EXAMPLE
843+ { <code> }
844+ #+END_EXAMPLE
845845
846− If you want, you can indent every line, but you can also be lazy and just
847− indent the first line of each block.
846+ If you want, you can indent every line, but you can also be lazy and
847+ just indent the first line of each block.
848848
849−[3] This is /easier/ to type. Inline notes may contain
850− [[http://google.com][links]] and =]= verbatim characters, as well as
851− [bracketed text].
849+[fn:3] This is /easier/ to type. Inline notes may contain
850+ [[http://google.com][links]] and =]= verbatim characters, as well as
851+ [bracketed text].
852852
853−[4] In quote.
853+[fn:4] In quote.
854854
855−[5] In list.
855+[fn:5] In list.