Open wkoeter opened 6 years ago
Another workaround: Table not within a para element. Should be directly under a summary tag
@wkoeter
XML document has an official way to create a "table". See this tutorial and this official doc.
However, Vsxmd does not support this complicated <list>
tag. From my personal experience, a table could be described as a Markdown list:
Here is the matrix:
- Solution A
+ Pros: ...
+ Cons: ...
- Solution B
+ Pros: ...
+ Cons: ...
Could you mind to share your scenario about why using table to represent your doc?
Hi @lijunle thank you for your reply,
I Dont think that will solve my scenario. I Really want a table to represent something.
@wkoeter Do you use the Markdown table or XML document <list>
tag?
@lijunle can you elaborate on your question? I use the comments as provided in the example.
/// Table /// |CA|CB| /// |---|---| /// |A|B|
@wkoeter XML doc has an official way to declare table, like this:
/// <list type="table">
/// <listheader>
/// <term>Action</term>
/// <term>Description</term>
/// <term>Power Consumption</term>
/// </listheader>
/// <item>
/// <term>Forward</term>
/// <term>Move forwards in a straight line.</term>
/// <term>50W</term>
/// </item>
/// <item>
/// <term>Backward</term>
/// <term>Move backwards in a straight line.</term>
/// <term>50W</term>
/// </item>
/// <item>
/// <term>RotateLeft</term>
/// <term>Rotate to the left.</term>
/// <term>30W</term>
/// </item>
/// <item>
/// <term>RotateRight</term>
/// <term>Rotate to the right.</term>
/// <term>30W</term>
/// </item>
/// <item>
/// <term>Dig</term>
/// <term>Tells the robot to dig and obtain a soil sample.</term>
/// <term>800W</term>
/// </item>
/// </list>
It looks like HTML table
tag and too canonical as a doc. I am not sure if people really write table like this, so I don't implement the support before.
I think your table is intuitive. It is worth to support it in Vsxmd.
/// |Header1|Header2|
/// |---|---|
/// |A|B|
/// |C|D|
/// |E|F|
Hi @lijunle, The Vsxmd already supports this markdown format that Willem posted. the only problem is that because of the space between /// comment
and the pipe. The Vsxmd transpose this space and markdown only recognize it as a table if the first character is a pipe.
I can take a look on this issue
@saleslessa Great thanks!
Hello, do you have any update about this bug ?
Table does not show properly from normal comments.
Comment: /// Table /// |CA|CB| /// |---|---| /// |A|B|
Expected: Table in markdown
Actual:
Workaround: Make sure everything is currently on same level. Convention to have space after Remove automatically added space after comment (///) ///Table ///|CA|CB| ///|---|---| ///|A|B|