Skip to content

Simplify and reorganize Lua filter introduction#9106

Open
IlonaSilverwood wants to merge 2 commits into
jgm:mainfrom
IlonaSilverwood:master
Open

Simplify and reorganize Lua filter introduction#9106
IlonaSilverwood wants to merge 2 commits into
jgm:mainfrom
IlonaSilverwood:master

Conversation

@IlonaSilverwood

Copy link
Copy Markdown
Contributor

Something went wrong on my end in pull request #9120

Simplifies Lua filter introduction and comparison to JSON

  • Removes text previously mentioned in filter parent topic
  • Simplifies text for easier skimming

Part of work on issue #8750

Co-authored-by: Matt Dodson <47385188+MattDodsonEnglish@users.noreply.github.com>

Comment thread 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

Copy link
Copy Markdown
Owner

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.

Comment thread doc/lua-filters.md

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

Copy link
Copy Markdown
Owner

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.

Comment thread doc/lua-filters.md
Comment on lines +69 to 75
Command Time
--------------------------------------- -------
`pandoc` 1.01s
`pandoc --filter ./smallcaps` 1.36s
`pandoc --filter ./smallcaps.py` 1.40s
`pandoc --lua-filter ./smallcaps.lua` 1.03s

Copy link
Copy Markdown
Owner

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?

Comment thread doc/lua-filters.md
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`):

Copy link
Copy Markdown
Owner

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

Comment thread doc/lua-filters.md
However, JSON filters have limitations:

- Writing JSON to stdout and reading it from stdin (twice, once
on each side of the filter) is inefficient.

Copy link
Copy Markdown
Owner

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.

Copy link
Copy Markdown
Owner

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

Comment thread doc/lua-filters.md
Comment on lines +61 to +62
- External dependencies vary between users, and universal JSON
filters are not possible.

Copy link
Copy Markdown
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants