Skip to content

Empty table column when last pipe is followed by a (non-breaking) space #383

@selfthinker

Description

@selfthinker

I've noticed that some tables sometimes have an additional empty column at the end.
For example, the first table in our table guidance has another column after the "Jenkey" column. (In case that gets fixed soon, here is the archived version of the page.) The way tables are styled means that such an empty column is not visible.

This is how it looks with all the cells made visible:
Table with empty column at the end.

It turns out that the reason why that happens is because there is an invisible non-breaking space at the end of one row.

|# Sheep | 50 | 60 | 80| 

(Not sure if this will have copied the space character correctly. It is not a normal space but a non-breaking space character. This character will most probably have come from copying and pasting from a Google Doc.)

Is there a way to fix this on the code level?
Whenever any kind of space follows the pipe and there are no other characters before the newline, presumably that should always be ignored.

If yes, is this repo the right place to fix this or should it be fixed in upstream Kramdown or via sanitising Publisher input?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions