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

Tables indented by double tabs do not render properly #721

Closed
spencer246 opened this issue Oct 17, 2020 · 1 comment
Closed

Tables indented by double tabs do not render properly #721

spencer246 opened this issue Oct 17, 2020 · 1 comment
Assignees
Labels

Comments

@spencer246
Copy link

spencer246 commented Oct 17, 2020

Version: Markdown-it v12.0.0

Description

Consider the following Markdown source: a table inside a nested list. Each line of the table is indented by two consecutive tabs.

- Level 1

	- Level 2

		| Column 1 | Column 2 |
		| -------- | -------- |
		| abcdefgh | ijklmnop |

What is expected (Github's implementation)

  • Level 1

    • Level 2

      Column 1 Column 2
      abcdefgh ijklmnop

What actually happens

It seems that the first 4 characters of each line after the tabs (| Co, | ab) is removed.

Demonstration of the bug @ https://markdown-it.github.io/

Discussions

According to the GFM spec, "in contexts where whitespace helps to define block structure, tabs behave as if they were replaced by spaces with a tab stop of 4 characters."

If every tab is replaced with 4 whitespaces, Markdown-it correctly renders the table.

@puzrin puzrin added the bug label Oct 17, 2020
rlidwka added a commit that referenced this issue Oct 19, 2020
rlidwka added a commit that referenced this issue Oct 19, 2020
@rlidwka
Copy link
Member

rlidwka commented Oct 19, 2020

Fixed, thanks for reporting.

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

No branches or pull requests

3 participants