Closed guiraldelli closed 1 year ago
I'm still getting incorrect HTML, but now correct native, so looking into a possible bug in HTML writer...
Reopening because I don't understand this issue. I'm now getting the following, correct looking, native output:
[ Table
( "" , [] , [] )
(Caption
Nothing [ Plain [ Str "My" , Space , Str "table" ] ])
[ ( AlignDefault , ColWidthDefault ) ]
(TableHead
( "" , [] , [] )
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Header" , Space , Str "1" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Header" , Space , Str "2" ] ]
]
])
[ TableBody
( "" , [] , [] )
(RowHeadColumns 0)
[]
[ Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Row" , Space , Str "1.1" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Row" , Space , Str "1.2" ] ]
]
, Row
( "" , [] , [] )
[ Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Row" , Space , Str "2.1" ] ]
, Cell
( "" , [] , [] )
AlignDefault
(RowSpan 1)
(ColSpan 1)
[ Plain [ Str "Row" , Space , Str "2.2" ] ]
]
]
]
(TableFoot ( "" , [] , [] ) [])
]
But when I render this to HTML or any other format, I only get 1.1 and 2.1 -- the second column is omitted! What is happening here?
Ah, it's because there's only one element in the colspecs.
Hi.
djot-reader.lua
is not able to process tables. (See output two paragraphs below.)The problem seems to be exclusively in the
djot-reader.lua
's, givenlua bin/main.lua
properly renders the HTML of the table, as well as the AST representation ofdjot.lua
is almost identical to the one ofdjot.net/playground
(the TypeScript version).I tried to quickly look in the origin of the problem (see
djot-reader-logging.diff
andpandoc-djot-reader-stderr.txt
indjot-reader-bug-report.zip
), and I have the impression the parameter (node
) sent toRenderer:table
is not proper.That is the furthest I managed to go by myself given my limited knowledge on Lua, but let me know whether I can support you further.
As a final remark, I insist on
djot.lua
instead ofdjot.js
because of limitations on my environment, and givendjot.js
is not binary-distributed (as Pandoc is), it is not an optional for me to use at my current environment.Thanks in advance.
djot-reader-logging.diff
andpandoc-djot-reader-stderr.txt
were extract by the commands below: