Comments (6)
See jgm/pandoc#3285. I have a better MWE there now. As far as panflute is concern, the most important question is the last one there. It seems to me it is reasonable to assert all the lists should have the some length.
from panflute.
So as I understand, the docx reader saves the row as a header instead as in the body of the table.
I recall you mentioned this is not allowed in Pandoc, no? (nonetheless, it seems to handle it just fine)
If @jgm intends to allow it, then I can push a workaround, but otherwise it might not be worth it.
from panflute.
The one I tested before has no body at all, this one has an empty body. But even if it is allowed, it might cause problems like that issue.
But on the other hand, the reason I was using my filter on that file was to try to capture the table before writing to markdown (the csv is kind of a different representation of the ast) so that I can manually edit the table to correct the output.
Probably we should wait to see how that issue unfold.
from panflute.
jgm/pandoc#3285 is closed. They fixed the bug in docx reader so that it won't output a 1 row header with empty body.
However, they didn't enforce the "no. of columns" are the same in the type level yet. But @jgm
has said that "it is safe to assert that the align-list, width-list, header-list, and each of the row-list are all having the same length".
So it is your call whether the assertion in panflute is relaxed to catch some corner cases from pandoc, or leave it as it currently is since the assertion should be true when the pandoc writers/readers behave correctly.
from panflute.
Update: I tested on the fixes done in jgm/pandoc#3285, for the case I posted above, they now have an empty header row. i.e. []
instead of [[],[]]
. I will continue to file bug reports over there. But it seems that some reader authors might uses the fact that pandoc is ok about it to write list an empty list rather than a list of n empty list.
from panflute.
Closed at least for now
from panflute.
Related Issues (20)
- Creating a Panflute filter that interacts with other filters HOT 1
- Reimplement the panflute.stringify with native pandoc writer HOT 2
- Unable to get Panflute filter comments.py to work correctly HOT 1
- Add comparison method to Element class? HOT 2
- Compatibility with Pandoc 2.18 HOT 3
- Using panflute as a writer rather than a filter HOT 8
- Stringifying the terms of a definition list results in AttributeError HOT 7
- Hwo to use the span method? HOT 1
- Applying panflute filter multiple times generates an unexpected result
- Can't convert markdown style citations to LaTeX style using panflute filter HOT 5
- Navigation with next and prev unstable HOT 3
- Add space before footnote in stringify function HOT 4
- Is there solution to add custom style for lists with panflute ? HOT 2
- Avoid side-effects in walk
- Figure, Table: to_json() crashes if caption is None HOT 1
- Reading the value of `--resource-path` inside a panflute filter ? HOT 3
- Trying to create new metadata from metadata
- Removal of click dependency HOT 3
- Installing globally on Ubuntu HOT 2
- Consider different check for RawInline formats?
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 panflute.