Cool trick!

I can see now why were you testing the convert_text() code.

One question though, if you first do

pandoc example.md --output=example2.md

Then applying the filters to example2.md would be an idempotent operation?


On Tuesday, November 29, 2016 at 5:13:18 PM UTC-5, Kolen Cheung wrote:

Hi,

I wrote another “interesting” filter base on the same idea, but in reverse: pantable/pantable2csv.py at master · ickc/pantable. It converts all tables in pandoc to a YAML-CodeBlock-styled CSV table defined in pantable.

Effectively, it adds a “CSV Writer”, where pantable is kind of “CSV Reader”.

I can kind of achieve idempotence here, but only at P^3 = P^2, not P^2 = P (it’s from pandoc though). Basically it captures all info from pandoc’s AST, so the conversion pantable2csv did should be “lossless”.

These are at least important to me because I can safely jump between the 2 formats (native pandoc table and csv table in code-block) without worrying too much. I could jump to csv for edit (more low-level, e.g. width control) and jump back to pandoc tables for better readability.

--
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/7e398825-a285-4e73-ad3d-908f1f141589%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.