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

MD056 - Consistent column number check not taking into account escaped pipes #497

Open
mbentley opened this issue Apr 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mbentley
Copy link

mbentley commented Apr 4, 2024

Description

An escaped pipe isn't taken into account when MD056 - Table has inconsistent number of columns is checking tables

Environment

MacOS Sonoma 14.4.1

MDL Version
0.13.0

Expected Behavior

Escaped pipes \| wouldn't be counted as a column.

Actual Behavior

It appears to be seeing the pipe that is escaped and considering it a column.

Replication Case

Here is a test file that shows the behavior

# Test File

| First | Second |
| :---- | :----- |
| Normal | Normal |
| true\|false | test |
$ mdl test.md
test.md:6: MD056 Table has inconsistent number of columns

Rendered table:

First Second
Normal Normal
true|false test
@mbentley mbentley added the bug Something isn't working label Apr 4, 2024
@HariSekhon
Copy link

I'm hitting this bug too with the following:

| header  | header2 |
| --------|---------|
| normal  | normal  |
| `\|`    | Jump to column, without a prefix number jumps to start of line |

I tried working around it using triple backticks, but this doesn't work either:

| header  | header2 |
| --------|---------|
| normal  | normal  |
| ```\|``` | Jump to column, without a prefix number jumps to start of line |

We really need inline ignores to work around these false positives, like #16 or as a second choice the ability to exclude a whole file as per #167

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants