mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #240] problem with TOML format for allowed elements #2054
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#2054
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 @gmc444-b on GitHub (Dec 16, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/240
I have a project with a
.markdownlintrcfile in YAML format, and I'd like to support some inline HTML markup in it. I tried adding a section for "MD033" as follows, and I get the error below. I've tried several variations, based on YAML documentation, but haven't got this working.Searching for examples that set this option only brings up JSON variants.
What am I doing wrong? Could a working example for this type of construct be supplied in the documentation?
and the error:
@DavidAnson commented on GitHub (Dec 16, 2019):
Please include the example?
@gmc444-b commented on GitHub (Dec 16, 2019):
Sorry, I submitted before doing so. I've updated the issue with the example and the error.
@DavidAnson commented on GitHub (Dec 16, 2019):
I think that formatting is not correct. Here is an example for MD033 that uses JSON from the test cases: https://github.com/DavidAnson/markdownlint/blob/master/test/inline_html-allowed_elements.json
I ran that through one of the online converters to produce the following YAML output:
Try that?
@gmc444-b commented on GitHub (Dec 16, 2019):
A bit more information, I was mistaken about the file being in YAML format, it's actually TOML. Below is the JSON version that does work for me:
This site provides a converter that provides this output:
An example input:
Together, these produce the error I described above.
@DavidAnson commented on GitHub (Dec 16, 2019):
The CLI does not support TOML-formatted config files. Per the documentation in that project repository, only JSON and YAML formatting is supported.
https://github.com/igorshubovych/markdownlint-cli
TOML is rare enough that it’s not included by default, and the CLI does not expose a way to provide a custom parser to allow it like the library does.
@gmc444-b commented on GitHub (Dec 16, 2019):
It turns out TOML looks like INI format, which is supported, and the following format works:
Thank you for your help, @DavidAnson .