Closed MarcoIeni closed 3 years ago
I think markdown lint should exclude/ignore codeblocks completely and we should enforce style inside the codeblock with a cargo-fmt.toml
. I already opened an upstream issue for this.
Yes, but in the meantime this is the best we can do. Should we manually check if code contains tab in the meantime?
Also, what's the point of changing markdownlint
default behavior by allowing tabs in code blocks? It's a sane default imho.
Yes, but in the meantime this is the best we can do. Should we manually check if code contains tab in the meantime?
Also, what's the point of changing
markdownlint
default behavior by allowing tabs in code blocks? It's a sane default imho.
Naja, because I assume people write their code in their favoured IDE and adjust the style their with cargo fmt. We could state that in contributing as well, as soon as we have a cargo-fmt.toml
. That they probably write their code in an article.rs
file so that it works and gets checked by rust-analyzer
/RLS
and run cargo fmt
then copy it over. Would let markdownlint mess with Rust code.
Is rustfmt
with default checks supported in mdbook at the moment? I.e. a similar code like mdbook test
that checks for format.
Is
rustfmt
with default checks supported in mdbook at the moment? I.e. a similar code likemdbook test
that checks for format.
I opened an upstream issue for this for mdbook fmt
which would be quite lovely, so i don't think so. But we could adjust the workflow given in contributing to let people know how we imagine it as mentioned above
Upstream issue is here https://github.com/rust-lang/mdBook/issues/1422
Yeah, this is awesome and what you have written is a very good long term plan, I hope it gets implemented soon.
In the meantime you don't want to merge this? 🥺
See https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md#md010---hard-tabs