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

Formatting tables with backslash in cell #77

Closed
MAZ01001 opened this issue Nov 8, 2024 · 1 comment
Closed

Formatting tables with backslash in cell #77

MAZ01001 opened this issue Nov 8, 2024 · 1 comment

Comments

@MAZ01001
Copy link

MAZ01001 commented Nov 8, 2024

When trying to format a table with a backslash inside it doesn't work or rather it works up to (excluding) the row with the backslash.

I noticed this when using tex/latex in markdown tables (like $\LaTeX$ = $\LaTeX$) and trying to format/edit the table with this extension.

Setup

Create a new tab/file and paste the following table:

|A|B|
|-|-|
|A|B|
|\ |B|
|A|B|

Notice the space after the backslash.

Then move the cursor on the table (somewhere in the top row) and execute Text Tables: Format under cursor (from the F1 menu).

Expectation

| A   | B   |
| --- | --- |
| A   | B   |
| \   | B   |
| A   | B   |

Reality

| A   | B   |
| --- | --- |
| A   | B   |
|\ |B|
|A|B|

It doesn't seem to matter where the backslash is or what it is surrounded by as long as there is at least one backslash it fails.
Except when it's used to escape a pipe (\|) then it's fine and correctly formats the table, treating the | as plain text and not part of the table syntax.

Version

Text Tables 0.1.5 (currently newest)

VSCode 1.95.2 (currently newest)

@MAZ01001
Copy link
Author

MAZ01001 commented Nov 8, 2024

nvm, another extension conflicted with the behavior of the formatter.

now it's just the same problem as #59 and #42 not being able to escape | with \ in table cells.

@MAZ01001 MAZ01001 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant