Closed artelse closed 4 years ago
The script was fine with the simple tables I tested it with. But there can be inconsistencies with the note format depending on Note Station version and platform. Could you post an .nsx file with the example of the broken table.
Ok, here is an example. What happens a lot on NS is difficulties with pasted html from websites like in this example. NS is built on ancient web tech and gets confused trying the cleanup function. Anyway, here's a zip. test.zip
I see the issue. The pandoc app the script uses to convert html to markdown thinks your tables are too complex to convert to markdown traditional pipe tables. Keeping raw html is also disabled in the script to prevent too messy md files.
I will implement advanced options for for using grid format tables and keeping raw html that will help you getting the tables. Meanwhile you can try different pandoc options yourself in 60-77 lines of the script (depending on pandoc version you have) if you know what to do.
Yes, saw those lines. I have version2.1 I belief. Will look into pandoc for the parameter settings. Then we can perhaps also fix the html entities problem of not converting \> for example as you can see in the same file.
Changed a few options: grid_tables
and angle_brackets_escapable
which gives me closer to the result I want. The other table options won't output any data. Thanks for showing me pandoc, a great piece of software to have in my toolbox.
Hi, great script! Question, are tables expected to be converted to [TABLE] with discarded content? If not, are you planning to implement table conversion, or at least embed its content between code tags perhaps?