custom-writers.md: use filter to include source of example.

This commit is contained in:
John MacFarlane 2021-12-06 13:04:31 -08:00
parent 23b2617bf7
commit 72075423d0

View file

@ -34,6 +34,8 @@ can do
pandoc --print-default-data-file sample.lua > sample.lua pandoc --print-default-data-file sample.lua > sample.lua
``` ```
# A custom HTML writer
`sample.lua` is a full-features HTML writer, with explanatory `sample.lua` is a full-features HTML writer, with explanatory
comments. To use it, just use the path to the custom writer as comments. To use it, just use the path to the custom writer as
the writer name: the writer name:
@ -46,3 +48,5 @@ pandoc -t sample.lua myfile.md
writer, so you can design your own custom writer by modifying writer, so you can design your own custom writer by modifying
the functions in `sample.lua` according to your needs. the functions in `sample.lua` according to your needs.
``` {.lua include="sample.lua"}
```