-
Notifications
You must be signed in to change notification settings - Fork 17
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
Rule MD010 does not exclude code blocks. #737
Comments
I hit this problem today. Do you have a plan to fix it? I record the commands and their execution results in a markdown. It would be nice if Thank you. |
Its on my list of things to fix prior to the next release. Probably within the next week or so. |
* #737 - adding fix to rule md010, and changes required to make that happen * updating to latest dev packages
Have the detection logic in for fenced code blocks, not indented code block. That will come next.
and allow both tabs, not just the tab in the code block. That fix is more involved, and looking into it for a future fix. |
This should be addressed with the v0.9.13 release. Please let me know if those changes work for you! |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Try.. https://github.com/jackdewinter/pymarkdown/releases/tag/v0.9.13.3 the release verification pipeline did not trigger as expected... and forgot to do a manual check. |
Thank you! $ git diff --cached
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 7165851..58faaec 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -23,7 +23,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/jackdewinter/pymarkdown
- rev: v0.9.12
+ rev: v0.9.13.3
hooks:
- id: pymarkdown
exclude: |
diff --git a/.pymarkdown.json b/.pymarkdown.json
index 462caff..8057cc5 100644
--- a/.pymarkdown.json
+++ b/.pymarkdown.json
@@ -1,7 +1,7 @@
{
"plugins" : {
"no-hard-tabs": {
- "enabled": false,
+ "enabled": true,
"code_blocks": false
},
"no-multiple-blanks": {
diff --git a/notes/dig.md b/notes/dig.md
index 67a7968..8184889 100644
--- a/notes/dig.md
+++ b/notes/dig.md
@@ -6,8 +6,9 @@
# oisix.com
```bash
+ # test tab
$ dig @8.8.8.8 SOA +noall +ans oisix.com
-oisix.com. 300 IN SOA ns-172.awsdns-21.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
+oisix.com. 300 IN SOA ns-172.awsdns-21.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
$ dig @8.8.8.8 MX +noall +ans oisix.com
oisix.com. 300 IN MX 10 mail01.oisix.com. run $ pre-commit run pymarkdown
PyMarkdown...............................................................Failed
- hook id: pymarkdown
- exit code: 1
notes/dig.md:9:1: MD010: Hard tabs [Column: 1] (no-hard-tabs)
notes/dig.md:11:18: MD010: Hard tabs [Column: 18] (no-hard-tabs)
notes/dig.md:11:23: MD010: Hard tabs [Column: 23] (no-hard-tabs)
notes/dig.md:11:28: MD010: Hard tabs [Column: 28] (no-hard-tabs)
notes/dig.md:14:11: MD010: Hard tabs [Column: 11] (no-hard-tabs)
<omit> |
are you trying to use thoughts? |
yes, my - repo: https://github.com/jackdewinter/pymarkdown
rev: v0.9.13.3
hooks:
- id: pymarkdown
exclude: |
(?x)^(
aws/panel.md|
jq/[\d|\w|_]+\/(.*?)\.md|
path/to/file3.py
)$
args:
- --config=.pymarkdown.json
- scan and cat .pymarkdown.json
{
"plugins" : {
"no-hard-tabs": {
"enabled": true,
"code_blocks": false
},
"no-multiple-blanks": {
"maximum": 2
},
"blanks-around-headers": {
"lines_above": 1,
"lines_below": 1
},
"line-length": {
"enabled": true,
"line_length": 160,
"heading_line_length": 160,
"code_blocks": false
},
"no-inline-html": {
"enabled": false
},
"single-title": {
"enabled": false
},
"ul-style": {
"enabled": false
}
},
"extensions" : {
"front-matter": {
"enabled": true
}
}
} Works fine except for no-hard-tabs |
Check now against |
I was able to do it! It seems to be ok. $ git diff --cached
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index c377226..4f86012 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -23,7 +23,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/jackdewinter/pymarkdown
- rev: v0.9.13.3
+ rev: 39770f261aaae32f56409129a76801fe7edd44e9
hooks:
- id: pymarkdown
exclude: |
diff --git a/.pymarkdown.json b/.pymarkdown.json
index 462caff..8057cc5 100644
--- a/.pymarkdown.json
+++ b/.pymarkdown.json
@@ -1,7 +1,7 @@
{
"plugins" : {
"no-hard-tabs": {
- "enabled": false,
+ "enabled": true,
"code_blocks": false
},
"no-multiple-blanks": {
diff --git a/notes/dig.md b/notes/dig.md
index 67a7968..706e609 100644
--- a/notes/dig.md
+++ b/notes/dig.md
@@ -7,7 +7,7 @@
```bash
$ dig @8.8.8.8 SOA +noall +ans oisix.com
-oisix.com. 300 IN SOA ns-172.awsdns-21.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
+oisix.com. 300 IN SOA ns-172.awsdns-21.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400
$ dig @8.8.8.8 MX +noall +ans oisix.com
oisix.com. 300 IN MX 10 mail01.oisix.com.
$ pre-commit run pymarkdown
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to /home/raki/.cache/pre-commit/patch1694265465-477971.
PyMarkdown...............................................................Passed
[INFO] Restored changes from /home/raki/.cache/pre-commit/patch1694265465-477971. |
closing after verification |
There is configuration for handling these, but nothing to act on.
The text was updated successfully, but these errors were encountered: