Git Product home page Git Product logo

Comments (6)

ickc avatar ickc commented on July 21, 2024

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.

sergiocorreia avatar sergiocorreia commented on July 21, 2024

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.

ickc avatar ickc commented on July 21, 2024

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.

ickc avatar ickc commented on July 21, 2024

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.

ickc avatar ickc commented on July 21, 2024

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.

sergiocorreia avatar sergiocorreia commented on July 21, 2024

Closed at least for now

from panflute.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.