Open mquinson opened 2 years ago
This is related to how cells lines are split into cells. The regexp for the separator include "e":
I'm not sure we can use the split
trick if we want to fix this.
I would argue that the formatting in the bug report is not proper Asciidoc: https://docs.asciidoctor.org/asciidoc/latest/tables/add-cells-and-rows/ stipulates that the cell separator is prefixed with a space character.
I'd prefer to save the split
trick if possible. That's really convenient.
Is it possible to at least detect that the input is malformated and report it as an error to the users?
I just learned about table style operators. Many thanks for that ;) On https://docs.asciidoctor.org/asciidoc/latest/tables/format-cell-content/ all these operators are at the beginning of a line. Would that help in some way ro keep the split? Have not seen any formal grammar anywhere, but the least I would expect is some whitespace to preceed the operator.
We can introduce the need of a beginning of line or space as prefix, but this is a change of behavior.
@smoe The first paragraph of https://docs.asciidoctor.org/asciidoc/latest/tables/add-cells-and-rows/#table-cells is quite clear:
Each new cell in a table is declared with a cell separator. The default cell separator is a vertical bar (|). All of the content entered after a cell separator is included in that cell until the processor encounters a space followed by another vertical bar (|) or a new line that begins with a |.
The cell specifiers are place directly in front of the cell separator, that is after a space or a new line.
The po4a parser for cells can work with well formatted cells, but will not behave correctly if the whitespace is missing.
You are correct.
I think we should at least produce a warning when there is no space involved in the separator, saying that something may go wrong. Don't you think so?
Hello,
a new bug was reported against the Debian package, here: https://bugs.debian.org/1019548
@jnavila, do you have some time to look at it? I'm not sure when I'll find some time to devote to po4a, but this will happen. It always happen after a while :)
Thanks for your help, Mt