JetBrains / JetBrains/markdown

GFM Tables are not parsed correctly when fewer than three hyphens exist in the delimeter row.

Open
#48 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
958
Forks
104
Avg merge
17h 30m
Merged PRs (30d)
12

Description

The [GFM Spec](https://github.github.com/gfm/#tables-extension-) allows a table's delimeter row to have a single hyphen per column.

The following code:

```markdown
|a|
|-|
|b|
```

is valid table:

|a|
|-|
|b|

But the `GFMFlavourDescriptor` just parses it as text:

```
Markdown:PARAGRAPH
Markdown:TEXT '|a|'
Markdown:EOL
Markdown:TEXT '|-|'
Markdown:EOL
Markdown:TEXT '|b|'
```

which is rendered as:

```html

|a|
|-|
|b|


```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.