prettier / prettier-vscode

Visual Studio Code extension for Prettier
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
MIT License
5.03k stars 447 forks source link

prettier-ignore doesn't work with table title #3332

Open seven1240 opened 2 months ago

seven1240 commented 2 months ago

Is your feature request related to a problem? Please describe.

<!-- prettier-ignore --> works in #762 but when a table has a title, the inserted <!-- prettier-ignore --> might cause trouble on some markdown parser, e.g. Pandoc would ignore the title when rendering the following table.

: table title
<!-- prettier-ignore -->

| a | b|
|--| ---|
| aaa | bbb|

As it's not possible to let all markdown parser to ignore the comment, Is it possible to put the prettier-ignore before the title and still ignores the following table?

e.g.

<!-- prettier-ignore -->
: table title

Describe the solution you'd like

<!-- prettier-ignore -->
: table title

| a | b|
|--| ---|
| aaa | bbb|

Describe alternatives you've considered

Additional context

Thanks.

seven1240 commented 1 month ago

or is it possible to ignore everything between an on/off block?

<!-- prettier-ignore on -->

what ever ...

<!-- prettier-ignore off -->

Thanks.