Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multi-line rows in tables #406

Closed
KantarBruceAdams opened this issue Nov 17, 2017 · 13 comments
Closed

Support for multi-line rows in tables #406

KantarBruceAdams opened this issue Nov 17, 2017 · 13 comments

Comments

@KantarBruceAdams
Copy link

This implementation (as used by VSTS) doesn't seem to support multi-row cells in tables (a github flavour markdown extension). As below:

Fruit Price Advantages
Bananas first line
next line
first line
next line
Bananas first line
next line
first line
next line

If this is deliberate it might help to clarify in the documentation.
(i.e. this page https://help.github.com/articles/organizing-information-with-tables/)

See also:
https://stackoverflow.com/questions/47324785/how-can-i-add-a-table-with-multi-row-cells-to-a-readme-in-vsts/47335483#47335483

@puzrin
Copy link
Member

puzrin commented Nov 17, 2017

Seems to work as expected

Could you provide example with error via demo?

@KantarBruceAdams
Copy link
Author

KantarBruceAdams commented Nov 20, 2017

I'll take that as sufficient evidence the problem is not markdown-it.

I can't provide an example. Microsoft claim to use your implementation here but they don't state which version or configuration. I suspect they have disabled html completely in VSTS for fear of real or imaginary html injection attack vectors.

@Lucas-C
Copy link

Lucas-C commented Jan 9, 2018

Note that if you don't want to use <br> and have a very long row line in Markdown,
you can use this plugin:
https://github.com/RedBug312/markdown-it-multimd-table#multiple-lines-of-row

@CatGirlsAreLife
Copy link

CatGirlsAreLife commented Jul 7, 2018

What about a markdown table within table? Similar to the rst examples that are similar?
Like a table of appveyor build badges where you got a row named windows which breaks up into VS2017 & VS2017 Preview, and another one named Linux for Appveyor Linux builds.

@mahdiaslami
Copy link

mahdiaslami commented May 27, 2019

if it was possitble to have a table like following table it was more flexible

| column 1 | column 2 |
|----------|----------|
| value    | * value 1|
|          | * value 2|
|----------|----------|
| value    | * value 1|
|          | * value 2|

is there any way to do this? because this structure help to have readable document with notepad and other editor too.

@puzrin
Copy link
Member

puzrin commented May 27, 2019

All extensions should be done via plugins. Default implementation works like github's one and modification requests are not accepted.

@8tm
Copy link

8tm commented Oct 9, 2019

Mode 3: HTML (this is the best option in my opinion)

Collumns
FirstSecondThird
First 1 Second 2
Second 2
Third 1
Third 2
Third 3
  • List 1 element
  • List 2 elements (1)
  • List 2 elements (2)
  • List 3 elements (1)
  • List 3 elements (2)
  • List 3 elements (3)

@JimLewis
Copy link

JimLewis commented Jan 1, 2021

if it was possitble to have a table like following table it was more flexible

| column 1 | column 2 |
|----------|----------|
| value    | * value 1|
|          | * value 2|
|----------|----------|
| value    | * value 1|
|          | * value 2|

is there any way to do this? because this structure help to have readable document with notepad and other editor too.

I need this too. Maybe I need to switch to .rst as without this, md will not be practical to use. Looking for a replacement for word for general purpose open source documentation.

@eyalroz
Copy link

eyalroz commented Aug 24, 2021

@Riverlance : That's not what's been asked.

@8tm : You haven't posted the markdown source of your table.

@markandersonus
Copy link

i need this too

@damies13
Copy link

@Riverlance & @8tm

Putting html in the markdown defeats the point of using markdown in the first place, if people need to learn html to use markdown then they may as well just write the whole document in html.

These are suitable as temporary work arounds not solutions.

I'm surprised this issue is closed as I don't see any resolution?

@8tm
Copy link

8tm commented Nov 6, 2022

@Riverlance : That's not what's been asked.

@8tm : You haven't posted the markdown source of your table.

Mode 3: instead of < br > use < p >

| Collumns |||
| --- | --- | --- |
| First | Second | Third |
| First 1 | <p> Second 2 <p> Second 2 | <p> Third 1 <p> Third 2 <p> Third 3 |
| * List 1 element | <p>* List 2 elements (1) <p>* List 2 elements (2) | <p>* List 3 elements (1) <p>* List 3 elements (2) <p>* List 3 elements (3) |
Collumns
First Second Third
First 1

Second 2

Second 2

Third 1

Third 2

Third 3

* List 1 element

* List 2 elements (1)

* List 2 elements (2)

* List 3 elements (1)

* List 3 elements (2)

* List 3 elements (3)

nthykier pushed a commit to Debian/debhelper that referenced this issue Jul 29, 2023
I find reading plain text documents a bit hard, especially on smaller
screens, and converting the file to Markdown allows easy conversion to
HTML, while not reducing plain text readability.

This Markdown file is mostly compatible with the [original syntax][1],
except for the table and the links (even though the [last beta][2] of
the original markdown.pl does support the latter).

I don't particularly like the table in the "Arguments processing"
section, as it requires GFM / Markdown Extra extensions; it also doesn't
look great, as you can't inset [newlines in tables][3].

The simplest way to convert this file from Markdown to HTML locally
is the following:

    # apt install cmark-gfm
    $ cmark-gfm --extension table PROGRAMMING.md > PROGRAMMING.html

[1]: https://daringfireball.net/projects/markdown/syntax
[2]: https://sources.debian.org/src/markdown/1.0.2~b8-7/ChangeLog/#L83
[3]: markdown-it/markdown-it#406
@sushantsp
Copy link

sushantsp commented Feb 23, 2024

Why cant we have simple Identifier that this is a text blob that needs to come in one cell only.
more like put it in triple quote or quadruple quote or something else. < p >, < b r> arent the solutions and genuinely defeats the purpose of the markdown like someone said above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests