Skip to content

docx to markdown, how to ignore certain things (like tables and images) #9935

Answered by tarleb
michellepace asked this question in Q&A
Discussion options

You must be logged in to vote

This can be done with a pandoc filter. Below is a Lua filter, which should work out-of-the-box, without having to install additional software. However, if you prefer a more pythonic solution, then checkout "panflute".

local function omit ()
  return {}
end

return {{
  Table = omit,
  Figure = omit,
  Image = omit,
  -- and so on.
}}

Save the above to a file and pass it to pandoc via the --lua-filter command line parameter.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@michellepace
Comment options

Answer selected by michellepace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants