cebe / cebe/markdown

Table without body at the end of markdown not detected

Open
#179 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1k
Forks
137
PR merge metrics
No merged PRs in 30d

Description

The following markdown table without body at the end of the markdown text is not detected and will be rendered as paragraph:

```
"| Tables | Are | Cool |\n| ------------- |:-------------:| -----:|"
```

while this one is detected (due to the following line):

```
| Tables | Are | Cool |\n| ------------- |:-------------:| -----:|\n\nasdf
```

Due to this check: https://github.com/cebe/markdown/blob/master/block/TableTrait.php#L23

Contributor guide

Open the contributing guide

Research direction

Read block/TableTrait.php at the linked check and reproduce the end-of-document table case described in the issue. Update the table detection behavior so a table with no body at the end is handled consistently with one followed by another line, then verify both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.