arogachev
arogachev

Reputation: 33538

Github Flavored Markdown Tables are rendered as plain text or vertical separator appears in content

I am writing README for one of my extensions on Github.

I have the following markup:

**Filled tests:**

id | name
-- | ----------------
1  | Common test
2  | Programming test

**Filled questions:**

id | test_id | content                             | is_active | Current position
-- | ------- | ----------------------------------- | --------- | ----------------
1  | l       | What's your name?                   | 1         | 1
2  | 1       | What's your age?                    | 1         | 2
3  | 1       | What's your favorite dish?          | 1         | 3
4  | 1       | What's your hobby?                  | 1         | 4
5  | 1       | What's your favorite sport?         | 1         | 5
6  | 2       | What's you programming experience?  | 1         | 1
7  | 2       | What language you use to code?      | 1         | 2
8  | 2       | What DBMS you have experience with? | 1         | 3
9  | 2       | What VCS you have experience with?  | 1         | 4
10 | 2       | Do you use CSS preprocessors?       | 1         | 5

But it renders as plain text.

I followed official documentation here and seems that syntax is correct.

By the way, initially it was like this (no spaces in second line):

**Filled tests:**

id | name
---|-----------------
1  | Common test
2  | Programming test

But i noticed that in second column in certain rows 1 is shown as |, so I decided to change it to be exactly as in docs.

Are there any limitations to spaces or header length?

What I'm doing wrong?

Update:

I also tried to add additional space at the end of id column (thought maybe it's too short).

**Filled tests:**

id  | name
--- | ----------------
1   | Common test
2   | Programming test

And so on for other tables.

Tables are shown correctly, but however in second column (test_id) in certain cells 1 again is shown as |.

I checked the generated html and there is 1 there.

Seems weird. Tried to reset cache, did't help.

Upvotes: 1

Views: 518

Answers (1)

arogachev
arogachev

Reputation: 33538

I contacted Github support and the problem is now solved.

1) As for rendering table as plain text, you need to use at least 3 hyphens for column:

**Filled tests:**

id  | name
--- | ----------------
1   | Common test
2   | Programming test

I asked about adding this info in official docs and it probably will appear there soon.

2) As for displaying the vertical separators in certain cells of "test_id" column: it's not actually |, it's small L letter - l. Looks so similar, didn't notice that even after double checking. After replacing with 1 everything is displayed fine.

Upvotes: 2

Related Questions