[GH-ISSUE #1691] Incorrect warning when md is too long #734

Closed
opened 2026-03-03 01:29:26 +03:00 by kerem · 5 comments
Owner

Originally created by @1298345095 on GitHub (Jul 25, 2025).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1691

When text is short, there is no problem (split into multiple files)

Such as this:

```c
/* header files go up here */
/* note that C comments are enclosed within a slash and
 a star, and may wrap over lines */
// two slashes work too (and may be preferred)
#include <stdio.h>
// main returns an integer
int main(int argc, char *argv[]) {
    /* printf is our output function;
    by default, writes to standard out */
    /* printf returns an integer, but we ignore that */
    printf("hello, world\n");
    /* return 0 to indicate all went well */
    return (0);
}
```

Warning: MD018/no-missing-space-atx: No space after hash on atx style heading (Mistakenly identify #include as title)

And this:

```makefile
hw: hw.o helper.o
	gcc -o hw hw.o helper.o -lm
hw.o: hw.c
	gcc -O -Wall -c hw.c
helper.o: helper.c
	gcc -O -Wall -c helper.c
clean:
	rm -f hw.o helper.o hw
```

MD010/no-hard-tabs: Hard tabs [Column: 1]

I already set "MD010":{
"ignore_code_languages": ["makefile"]
},

Originally created by @1298345095 on GitHub (Jul 25, 2025). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1691 <!-- Thank you for taking the time to report an issue! When deciding where to open an issue, please note there are multiple projects under the markdownlint umbrella: - https://github.com/DavidAnson/markdownlint : This is the core JavaScript/Node.js library and is used by other tools. Most issues with implementation and rule behavior belong here. - https://github.com/igorshubovych/markdownlint-cli : This is the original CLI for markdownlint. Issues specific to CLI belong here. - https://github.com/DavidAnson/markdownlint-cli2 : This is a newer CLI for markdownlint and is used by other tools. Issues specific to CLI2 belong here. - https://github.com/DavidAnson/vscode-markdownlint : This is the Visual Studio Code extension for markdownlint. Issues specific to VS Code belong here. - https://github.com/DavidAnson/markdownlint-cli2-action : This is a GitHub Action for markdownlint. Issues specific to the Action belong here. - https://github.com/markdownlint/markdownlint : This is the original markdownlint implementation for Ruby. All Ruby-related issues belong here. Before creating an issue, it's a good practice to search existing issues for something similar. If your issue has already been reported, please update the existing one with any new information. It's also good to review the documentation for any relevant details. When describing an issue, the following information is helpful: - What did you do? - What did you expect to happen? - What actually happened? - What messages or errors were there? - How can the issue be reproduced? - What version were you using? - What operating system were you using? The simplest demonstration of a problem is the most helpful. Small examples can be pasted into the issue description. (Be sure to paste as code so GitHub doesn't render the example in Markdown.) For larger examples, linking to a repository or file is more appropriate. Before proposing a new rule, please review the existing suggestions: https://github.com/DavidAnson/markdownlint/issues?q=is%3Aissue+is%3Aopen+label%3A%22new+rule%22 Thank you! --> When text is short, there is no problem (split into multiple files) Such as this: ````plaintext ```c /* header files go up here */ /* note that C comments are enclosed within a slash and a star, and may wrap over lines */ // two slashes work too (and may be preferred) #include <stdio.h> // main returns an integer int main(int argc, char *argv[]) { /* printf is our output function; by default, writes to standard out */ /* printf returns an integer, but we ignore that */ printf("hello, world\n"); /* return 0 to indicate all went well */ return (0); } ``` ```` Warning: MD018/no-missing-space-atx: No space after hash on atx style heading (Mistakenly identify \#include as title) And this: ````plaintext ```makefile hw: hw.o helper.o gcc -o hw hw.o helper.o -lm hw.o: hw.c gcc -O -Wall -c hw.c helper.o: helper.c gcc -O -Wall -c helper.c clean: rm -f hw.o helper.o hw ``` ```` MD010/no-hard-tabs: Hard tabs [Column: 1] I already set "MD010":{ "ignore_code_languages": ["makefile"] },
kerem 2026-03-03 01:29:26 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner
<!-- gh-comment-id:3116353595 --> @DavidAnson commented on GitHub (Jul 25, 2025): I don't understand what problem you are reporting - your scenario and example produce no warnings in the demo app: <https://dlaa.me/markdownlint/#%25m%23%20Issue%201691%0A%0A%60%60%60makefile%0Ahw%3A%20hw.o%20helper.o%0A%09gcc%20-o%20hw%20hw.o%20helper.o%20-lm%0Ahw.o%3A%20hw.c%0A%09gcc%20-O%20-Wall%20-c%20hw.c%0Ahelper.o%3A%20helper.c%0A%09gcc%20-O%20-Wall%20-c%20helper.c%0Aclean%3A%0A%09rm%20-f%20hw.o%20helper.o%20hw%0A%60%60%60%0A%0A%3C!--%20markdownlint-configure-file%20%7B%0A%20%20%22no-hard-tabs%22%3A%20%7B%0A%20%20%20%20%22ignore_code_languages%22%3A%20%5B%0A%20%20%20%20%20%20%22makefile%22%0A%20%20%20%20%5D%0A%20%20%7D%0A%7D%20--%3E%0A>
Author
Owner
<!-- gh-comment-id:3116854376 --> @1298345095 commented on GitHub (Jul 25, 2025): > I don't understand what problem you are reporting - your scenario and example produce no warnings in the demo app: https://dlaa.me/markdownlint/#%25m%23%20Issue%201691%0A%0A%60%60%60makefile%0Ahw%3A%20hw.o%20helper.o%0A%09gcc%20-o%20hw%20hw.o%20helper.o%20-lm%0Ahw.o%3A%20hw.c%0A%09gcc%20-O%20-Wall%20-c%20hw.c%0Ahelper.o%3A%20helper.c%0A%09gcc%20-O%20-Wall%20-c%20helper.c%0Aclean%3A%0A%09rm%20-f%20hw.o%20helper.o%20hw%0A%60%60%60%0A%0A%3C!--%20markdownlint-configure-file%20%7B%0A%20%20%22no-hard-tabs%22%3A%20%7B%0A%20%20%20%20%22ignore_code_languages%22%3A%20%5B%0A%20%20%20%20%20%20%22makefile%22%0A%20%20%20%20%5D%0A%20%20%7D%0A%7D%20--%3E%0A <img width="854" height="520" alt="Image" src="https://github.com/user-attachments/assets/98c7caea-33df-45a0-87b3-52a5f74c2a6a" />
Author
Owner

@DavidAnson commented on GitHub (Jul 25, 2025):

It looks like you quoted my own message back to me. Can you please demonstrate the problem, either in the demo page or by pointing to a repository or gist?

<!-- gh-comment-id:3120116115 --> @DavidAnson commented on GitHub (Jul 25, 2025): It looks like you quoted my own message back to me. Can you please demonstrate the problem, either in the demo page or by pointing to a repository or gist?
Author
Owner

@1298345095 commented on GitHub (Jul 26, 2025):

It looks like you quoted my own message back to me. Can you please demonstrate the problem, either in the demo page or by pointing to a repository or gist?

No, I took the screenshot to show the line numbers, indicating that the issue occurs when there are many lines.

<!-- gh-comment-id:3123532564 --> @1298345095 commented on GitHub (Jul 26, 2025): > It looks like you quoted my own message back to me. Can you please demonstrate the problem, either in the demo page or by pointing to a repository or gist? No, I took the screenshot to show the line numbers, indicating that the issue occurs when there are many lines.
Author
Owner

@1298345095 commented on GitHub (Jul 26, 2025):

It looks like you quoted my own message back to me. Can you please demonstrate the problem, either in the demo page or by pointing to a repository or gist?

You can create a markdown file with many lines to demonstrate the problem. When I finish the markdown, I will upload it to my repository.

<!-- gh-comment-id:3123534396 --> @1298345095 commented on GitHub (Jul 26, 2025): > It looks like you quoted my own message back to me. Can you please demonstrate the problem, either in the demo page or by pointing to a repository or gist? You can create a markdown file with many lines to demonstrate the problem. When I finish the markdown, I will upload it to my repository.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#734
No description provided.