-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify and reorganize Lua filter introduction #9106
base: main
Are you sure you want to change the base?
Conversation
doc/lua-filters.md
Outdated
filters in Lua without any external dependencies at all. A Lua | ||
## Introduction | ||
|
||
With Lua filters, you can write Pandoc filters without any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be worth saying what pandoc filters are, or at least linking to the other doc on pandoc filters.
Also there are two spaces before without
in this line.
|
||
With Lua filters, you can write Pandoc filters without any | ||
external dependencies. Besides the simpler set-up, Lua filters are | ||
generally faster and can access utility functions to manipulate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faster than what? Since the text mentioning JSON filters was removed, this is no longer clear.
Command Time | ||
--------------------------------------- ------- | ||
`pandoc` 1.01s | ||
`pandoc --filter ./smallcaps` 1.36s | ||
`pandoc --filter ./smallcaps.py` 1.40s | ||
`pandoc --lua-filter ./smallcaps.lua` 1.03s | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this is indented 4 spaces and thus a code block instead of a table? What this change?
Python (`smallcaps.py`): | ||
manual (MANUAL.txt) to HTML, with versions of the same JSON filter | ||
written in compiled Haskell (`smallcaps`) and interpreted Python | ||
(`smallcaps.py`): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space at end of line
However, JSON filters have limitations: | ||
|
||
- Writing JSON to stdout and reading it from stdin (twice, once | ||
on each side of the filter) is inefficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line should be indented so it lines up to the list content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, I think the parenthetical comment could be removed
- External dependencies vary between users, and universal JSON | ||
filters are not possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it will be clear to readers what is meant by "universal JSON filters" or why dependency variation is important. I think the original text on this was clearer.
Something went wrong on my end in pull request #9120
Simplifies Lua filter introduction and comparison to JSON
Part of work on issue #8750
Co-authored-by: Matt Dodson <47385188+MattDodsonEnglish@users.noreply.github.com>