Welcome to Codidact Meta!
Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.
Comments on Markdown table alignment only renders correctly in preview
Parent
Markdown table alignment only renders correctly in preview
Codidact posts support Markdown tables.
For example, the following raw text:
Column 1 | Column 2
-------- | --------
Data A | Data B
Data C | Data D
renders as:
Column 1 | Column 2 |
---|---|
Data A | Data B |
Data C | Data D |
This works both in the edit preview and in the saved post.
However, alignment of data only works in the edit preview, and is ignored in the saved post.
For example, the following raw text:
Default | Left | Centre | Right
------- | :--- | :----: | ----:
1 | 2 | 3 | 4
5 | 6 | 7 | 8
renders as:
Default | Left | Centre | Right |
---|---|---|---|
1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |
In the edit preview these are aligned as intended (start editing to see this correct preview), but in the saved post they all have default alignment.
Post
Column alignment in tables now produces a warning that it won't render in the final post (it's part of the "unrecognized HTML" warning). Also, the editor preview now shows the same formatting as the final post, with all columns left-aligned.
I'm sorry we couldn't fix it the other way, by supporting column alignment, but at least now the preview doesn't mislead you.
0 comment threads