diff options
-rw-r--r-- | src/Text/Pandoc/Writers/DokuWiki.hs | 6 | ||||
-rw-r--r-- | tests/writer.dokuwiki | 16 |
2 files changed, 10 insertions, 12 deletions
diff --git a/src/Text/Pandoc/Writers/DokuWiki.hs b/src/Text/Pandoc/Writers/DokuWiki.hs index c4a99edca..b172741de 100644 --- a/src/Text/Pandoc/Writers/DokuWiki.hs +++ b/src/Text/Pandoc/Writers/DokuWiki.hs @@ -38,7 +38,6 @@ DokuWiki: <https://www.dokuwiki.org/dokuwiki> [ ] Don't generate <div> [ ] Implement conversion of tables [ ] Implement comments - [ ] Implement footnotes [ ] Work through the Dokuwiki spec, and check I've not missed anything out [ ] Test the output in Dokuwiki - and compare against the display of another format, e.g. HTML [ ] Remove dud/duplicate code @@ -77,7 +76,8 @@ pandocToDokuWiki opts (Pandoc meta blocks) = do body <- blockListToDokuWiki opts blocks notesExist <- get >>= return . stNotes let notes = if notesExist - then "\n<references />" + then "" -- TODO Was "\n<references />" Check whether I can really remove this: + -- if it is definitely to do with footnotes, can remove this whole bit else "" let main = body ++ notes let context = defField "body" main @@ -438,5 +438,5 @@ inlineToDokuWiki opts (Image alt (source, tit)) = do inlineToDokuWiki opts (Note contents) = do contents' <- blockListToDokuWiki opts contents modify (\s -> s { stNotes = True }) - return $ "<ref>" ++ contents' ++ "</ref>" + return $ "((" ++ contents' ++ "))" -- note - may not work for notes with multiple blocks diff --git a/tests/writer.dokuwiki b/tests/writer.dokuwiki index 742c9ca25..27fb29007 100644 --- a/tests/writer.dokuwiki +++ b/tests/writer.dokuwiki @@ -634,21 +634,19 @@ Here is a movie {{:movie.jpg|movie}} icon. ====== Footnotes ====== -Here is a footnote reference,<ref>Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. -</ref> and another.<ref>Here’s the long note. This one contains multiple blocks. +Here is a footnote reference,((Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. +)) and another.((Here’s the long note. This one contains multiple blocks. Subsequent blocks are indented to show that they belong to the footnote (as with list items). <pre> { <code> }</pre> If you want, you can indent every line, but you can also be lazy and just indent the first line of each block. -</ref> This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.<ref>This is //easier// to type. Inline notes may contain [[http://google.com|links]] and <code>]</code> verbatim characters, as well as [bracketed text]. -</ref> +)) This should //not// be a footnote reference, because it contains a space.[^my note] Here is an inline note.((This is //easier// to type. Inline notes may contain [[http://google.com|links]] and <code>]</code> verbatim characters, as well as [bracketed text]. +)) -<blockquote>Notes can go in quotes.<ref>In quote. -</ref> +<blockquote>Notes can go in quotes.((In quote. +)) </blockquote> - - And in list items.<ref>In list.</ref> + - And in list items.((In list.)) This paragraph should not be part of the note, as it is not indented. - -<references /> |