markdown-preview-enhanced
markdown-preview-enhanced copied to clipboard
How to display empty cell with extended table syntax?
Thank you for your greatful extension. I can't work without this. Lovely!
I want merge cells with by left-side cell. I know the syntax has variety by the software.
I hope only case of no-space to be merge with left-side. If there are space, it means empty cell.
But this extension merge either case.
Is there other way to display empty cell?
example
|X |Y |
|----|---|
|A |10 |
|B | |
|C ||
my hope
actual
I'm using the following on Windows10,
- Version 0.19.0 on Atom
- Version 0.6.0 on VS Code
If you use math syntax, you can use $\!$
to replace space. For example
|X |Y |
|----|---|
|A |10 |
|B | $\!$ |
|C ||
It will achieve your hope.
Also, you can use others like $\,$
, $\quad$
and so on. They all means space in math mode.
Thanks for your help. It is a greatful only answer.
I wish that markdown should be human friendly to read without rendering. I don't understand the benefits of treating blank cells as merged cells I think it is more rational a specification that merge the cell on the right side by continuing the pipe without inserting a blank.
Markdown preview enhanced is most useful preview renderer for me. I entered be sponcer to support continus improvement even if this issue to be rejected.
I hope a new option to add render specification on "extended table syntax" that empty cell not means to be merged with left side.
Because I think "markdown preview enhanced" is defact standard, and I can make finished my work only use this one.
So I think that this option is very useful to us even if other software rule is not be changed.
Thank you for reading this issue.
I had the same issue myself and was looking to see if this was being addressed.
@macchaka In the meantime you could use this in the parser.js file: https://github.com/shd101wyy/markdown-preview-enhanced/blob/master/docs/usages.md
// Keep empty tables as empty tables (| | -> | |)
markdown = markdown.replace(/\| {2,}/gm, ($0) => '| ')