Markdown tables do not handle vertical bar inside code block correctly
Open
Nobody has claimed this yet.
💊 bug
🤷 third-party
🙇♂️ help wanted
- Dominant language
- Go
- Stars
- 47.8k
- Forks
- 5.1k
- Avg merge
- 7h 23m
- Merged PRs (30d)
- 5
Description
- Gogs version (or commit ref): 0.11.19.0609
- Git version: 2.14.1
- Operating system: Windows 10
- Database (use
[x]):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gogs.io: https://try.gogs.io/nikonthethird/TestingTableIssue/src/master/README.md
- Yes (provide example URL)
- No
- Not relevant
- Log gist (usually found in
log/gogs.log): Not relevant.
Description
Tables containing a vertical bar | in a code block interpret it as a column separator.
I noticed it when trying to add the TypeScript type number | null inside a table cell.
The cell should contain the vertical bar, but instead it is split into two cells.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction URL in the issue and compare how a table cell containing a code block with number | null is rendered. Trace the Markdown table handling from that example and verify that the vertical bar remains inside the code block's cell rather than becoming a column separator.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, markdown
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100