This is a custom Pandoc writer that outputs the syntax used for writing reviews on Goodreads. This syntax is similar to HTML, but does not ignore line breaks, and supports some extra stuff like a spoiler
tag.
Download the pandoc-goodreads-writer.lua file and use -t path/to/pandoc-goodreads-writer.lua
when invoking pandoc.
Currently supported:
- Bold and italic text
- Hyperlinks
- Blockquotes
- Ordered and unordered lists
- Spoiler tags (see below)
Not supported yet:
- Images
- Book/author links
- Underlined and strikethrough text
- Footnotes (something will get rendered, but it won't look right)
Partially supported:
- Citations - it works with at least the one particular CSL style that I currently use, but not others
Use the spoiler
class to denote spoilers. In Pandoc markdown, that means either:
doing [this]{.spoiler} for an inline spoiler
Or:
::: {.spoiler}
Doing this to mark a whole block as a spoiler.
:::
Some test pandoc markdown files are in test/in and the corresponding outputs are in test/expected.
There is a script that will run pandoc on all the test files and diff the outputs against the expected outputs. To ensure you're using the intended version of pandoc, I suggest running them in Docker. If you have Docker installed and are on Mac/Linux, just run ./test/docker-test.sh
to build the image and run the tests.
See the LICENSE file for the license applicable to most of this project.
The tests include one or more CSL styles, which were copied from the citation-style-language/styles repository and are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license. Information about CSL is available at https://citationstyles.org/.