-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect handling of asciidoc tables with empty elements #343
Comments
Oh, yes... Empty cells are quite unexpected. |
Follow up from Petter on the Debian bug: I came across another problematic table. Seem to me the AsciiDoc parser
it is 'translated' into this table:
As you can see, not quite what was intended. I tried to add space in |
Yet another follow-up: I found a third mishandled table style in the LinuxCNC documentation.
we end up with this translated table:
Sadly the extra newline after |=== cause the asciidoc tool to reject the |
This is due to these lines: po4a/lib/Locale/Po4a/AsciiDoc.pm Lines 449 to 452 in 7fe0be4
Empty string is equal to no strings, which is the logic taken in general in this part of code. Is your work around doable in the sources? TBH and not minding my own business, using a table for formatting purpose is usually considered bad practice and harmful. These are truly enumeration lists. |
CSV style tables are not supported. Table cells support is very crude and will likely not support other styles than the common PSV style. |
#344 also fixes cells containing "0"... Another idiosyncrasy of Perl... 😢 |
Can we maybe raise an error message when presented with a CSV table? I think that it's better than silently failing. |
True, but there's nothing in the present code to discriminate a CSV table. This would require parsing the table header, and until now we managed to let asciidoc styling stuff out of the way, which kept things simpler. What would be reachable though is the ability to flip tablecells mode on and off with |
Luckily, the option name for deciding the format is |
…ables In such case, the table is processed as a simple verbatim text block.
In such case, the table is processed as a simple verbatim text block.
Hello,
I've got a bug report from Debian which reads as follows. Please see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002303 for the original bug report, which I inline below.
[Petter Reinholdtsen]
I ran into something while setting up po4a in the LinuxCNC project,
which I suspect is a bug in po4a handling of AsciiDoc tables.
This set of test files demonstrate the problem, where the translated
table format is messed up (lacking newlines). Note, adding '.' at the
end of the lines with directions avoid the problem.
Note, a workaround for the issue is to place a space character after the
last '|' character on the table rows with empty fields in the right
column.
The text was updated successfully, but these errors were encountered: