Skip to content

Column count mismatch warning for table cells containing an escaped pipe character \| #29

@nicolasff

Description

@nicolasff

Environment

  • macOS version: macOS Sequoia 15.7.3 (24G419)
  • MarkView version: v1.5.0 (latest)
  • Install method (brew / build from source): downloaded from the Releases page

Steps to Reproduce

  1. Create a Markdown file with a table in which an inline code block contains an escaped | (pipe) character: \|
  2. Open in MarkView
  3. A warning is reported about the row with the escaped pipe character not matching the number of columns from the table header. This is a false positive.

Use the following Markdown file:

| Action | Command                 |
| ------ | ----------------------- |
| Filter | `./program \| grep foo` |

Note: since we are in a table the | character must be escaped as \|, despite being within backticks (tables are an extension of the Markdown format, see the GitHub spec on this point).

Here is how GitHub renders this table:

Action Command
Filter ./program | grep foo

Expected Behavior

No warning. Line 3 of the file does not have "3 columns but header has 2 columns".

Actual Behavior

The table is rendered correctly, but the following line is identified as having "3 columns" when the table header has only two:

| Filter | `./program \| grep foo` |

This is very likely due to the | character from ./program \| grep foo, despite the \| escaping and despite the backticks. I assume the 3 columns being detected are the following:

| Filter | `./program \| grep foo` |
|─── 1 ──|───── 2 ─────|──── 3 ────|

The same warning appears even without backticks.

Screenshots (optional)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions