Running filters consecutively #9814
-
Here is a defaults file I use for proofreading with scripts taken from https://github.com/pandoc/lua-filters from: markdown
to: markdown
output-file: '/dev/null'
verbosity: INFO
filters:
- spell.lua
- wc.lua
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Both filters explicitly call However, the word-count filter has a way to allow further processing by setting: metadata:
wordcount: process-anyway With that you can switch the filter order to |
Beta Was this translation helpful? Give feedback.
Both filters explicitly call
os.exit(0)
, i.e., they cause pandoc to terminate. That means that those filters cannot be used in combination like that. You can think of them as custom writers. In fact, with today's pandoc capabilities, it would be conceptually cleaner to rewrite them as writers.However, the word-count filter has a way to allow further processing by setting:
With that you can switch the filter order to
['wc.lua', 'spell.lua']
and then have both filters run consecutively.