mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #214] <br> in table triggers MD33 #2031
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2031
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @darkantoine on GitHub (Aug 22, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/214
We use
inside table to spreads the description in a cell over several lines to add readibility.
This triggers MD33 but I dont think it should.
@DavidAnson commented on GitHub (Aug 22, 2019):
It sounds like you think the rule is behaving as described, but don’t like that behavior in your scenario? If so, you can disable
MD033entirely or use theallowed_elementsparameter to exempt just thebrtag.@twilight-moon commented on GitHub (Aug 28, 2019):
How do I disable MD033? In VSCode if I go to extension settings and under the Markdownlint:ignore section I added MD033. The problems area clears. When I go back to my document the MD033 entries show up again in the problems area.
@DavidAnson commented on GitHub (Aug 28, 2019):
@twilight-moon, it does not sound like you are disabling the rule correctly. Could you please show an example of the change you’re making?
For reference, here is the relevant documentation (note: config, not ignore): https://github.com/DavidAnson/vscode-markdownlint/blob/master/README.md#markdownlintconfig
@twilight-moon commented on GitHub (Aug 28, 2019):
Below is a screenshot of the setting:

I guess this is editing settings.json. On Mac is user/Library/Application Support/Code/User/settings.json. Reading the documentation in the link above it looks like I create a file .markdownlint.json in my home directory with the below. I did that but it still shows in the problems area.
After scrolling further down in the documentation I found inserting this line before the html table
<!-- markdownlint-disable MD033 -->and that worked.Thanks for your help.
@DavidAnson commented on GitHub (Aug 28, 2019):
The screenshot shows editing ignore, not config - that’s the wrong section. Your .markdownlint.json file looks good and can be put in the root folder of the current project to apply to the files within. The HTML comment you show is another good approach. Glad you got this sorted!
@DavidAnson commented on GitHub (Aug 31, 2019):
Closing as it seems the original and related questions are both addressed.
@afeblot commented on GitHub (May 26, 2025):
@DavidAnson , I find myself in the same situation where I have MD033 enabled and currently only allowing
<br/>tags because I consider them needed in tables. However, I'd be happy to forbid them elsewhere.If I succeed submitting a PR adding a "allowed_in_tables" option to MD033, will you consider it for merge?
@DavidAnson commented on GitHub (May 26, 2025):
For consistency, I'd say it should be named
table_allowed_elements. Seems like it could be simple to add by applying a check of this list and parent token check for thetablecontainer before reporting violations (along with tests).@afeblot commented on GitHub (May 26, 2025):
Yes, right. I'll look into this, thanks.
@afeblot commented on GitHub (May 26, 2025):
https://github.com/DavidAnson/markdownlint/pull/1615