Open expipiplus1 opened 6 years ago
It seems as though this is down to lblock
being quite indiscriminate about where it chops text.
I'm not sure this counts as a bug. The table specifies relative
column widths: 25% of total text width for each column. The only
way to achieve this in a grid table is by breaking things awkwardly.
You can use --columns
to increase the total width, or you can use a
different type of table (e.g. pipe table).
I've made an effort to correct this here: https://github.com/expipiplus1/pandoc/commit/7519805e18b78e284082085906c78d244f478a2d
When using Haddock tables, it inserts spaces at all the line breaks, causing the links to become invalid. It's not really a bug for the code block
tables as a human is reading them though.
I'm not sure this counts as a bug. The table specifies relative column widths: 25% of total text width for each column. The only way to achieve this in a grid table is by breaking things awkwardly. You can use
--columns
to increase the total width, or you can use a different type of table (e.g. pipe table).
Increasing the columns seems a little heavy handed (although I suppose this depends on exactly what --columns
means)
I'm not generating the source myself, it's being parsed from docbook, although this doesn't preclude changing grid tables to pipe tables I guess.
Would this patch be acceptable if the strictWrapping
value was configurable for the Haddock writer?
I'm wondering whether we should just change the default so that (in all writers that use grid tables) breaks occur only on spaces. This issue comes up from time to time -- also in markdown.
Yeah, that would be excellent also.
I've posted something on pandoc-discuss to get feedback about the idea.
I agree that changing the default with warning message is a good solution. Width is not as important to be enforced in this situation. And since either way is a compromised solution, emitting a warning about non perfect output is better than just handling it silently.
In the current behavior, round tripping back to the AST means something totally different, so there shouldn't be any need to have an option to choose the old behavior?
I wonder how the widths would change: only that column or scaling up the whole table proportionally?
only that column or scaling up the whole table proportionally?
just that column
To reproduce:
Observe that the links are split across several lines in the header. Many tools ingesting this output will insert a space erroneously.
After a cursory look, it seems as though the
nowrap
function in just replacing spaces with non-breaking spaces, whichgridTable
seems to ignore.