Comments (5)
--filter
runs a program:
% pandoc --help | grep filter
-F PROGRAM --filter=PROGRAM
-L SCRIPTPATH --lua-filter=SCRIPTPATH
Is this the standard list-table.lua
? If it was executable (it would presumably need a lua shebang line) I guess it would run standalone and perhaps you'd get this output, but when I try it I just get this:
% pandoc simple.md --filter ./list-table.lua
Error running filter ./list-table.lua:
Could not find executable ./list-table.lua
from list-table.
(Sorry, that was me logged in as the wrong user.)
from list-table.
I tried it as both an executable and non-executable. Yes, I got that error message, too, and so I ran chmod +x
on the file to "advance" to the error message above.
from list-table.
OK. Did you also add a shebang line? I'm guessing that you did something like this (I didn't know that this worked):
#!/usr/bin/env lua
-- lua filter for RST-like list-tables in Markdown.
-- Copyright (C) 2021 Martin Fischer, released under MIT license
if PANDOC_VERSION and PANDOC_VERSION.must_be_at_least then
PANDOC_VERSION:must_be_at_least("2.11")
else
error("pandoc version >=2.11 is required")
end
...
With this I get the same as you:
% pandoc simple.md --filter ./list-table.lua
lua: ././list-table.lua:8: pandoc version >=2.11 is required
stack traceback:
[C]: in function 'error'
././list-table.lua:8: in main chunk
[C]: in ?
Error running filter ./list-table.lua:
Filter returned error status 1
This happens because the lua script is running as a standalone executable and isn't receiving any lua context from pandoc, so PANDOC_VERSION
is nil
, the if
test fails, and you get the error message.
But the bottom line is that this was never going to work! Do you now see why? If not, I suggest re-reading the relevant section of the manual.
from list-table.
I see, that makes sense. The debugging experience was frustrating, but that seems to be on pandoc's side.
from list-table.
Related Issues (7)
- If some cells are undefined, the filter can generate an invalid AST
- DOCX output doesn't seem to work. HOT 3
- This LUA filter stopped working with the format `commonmark_x`, and is not displayed correctly with the format `markdown_github` on Codebraid HOT 31
- Documentation should clarify that the markdown variant has to support fenced divs
- The filter should be upgraded to work with codebraid
- Installing the filter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from list-table.