mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #276] Headings can be questions (MD026) #237
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#237
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 @jamescoleuk on GitHub (Apr 23, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/276
Thanks for the great library.
The default string for MD026 includes '?' and it should not.
In the documentation there is a link to a page as rationale. This page only mentions full stops, not anything else.
Other style guides also recommend against including a full stop at the end of a heading (e.g. The Economists's Style Guide, but don't mention any other punctuation.
It's perfectly legitimate and common (see this issue) to have a heading that is also a question. The '?' should be removed from the default string for MD026.
@PeterConstable commented on GitHub (May 19, 2020):
A more basic question is, what should a lint be enforcing:
Certainly Yes for the first, maybe for the second, but not the third.
I encountered this when I went to use ! at the end of a heading. I really didn't expect a lint to tell me not to do that because of editorial styling rules.
If there were a syntactic issue, like final punctuation creating havoc with heading links, that would be a different matter.
@DavidAnson commented on GitHub (May 19, 2020):
This project has a mix of all three categories. It’s slightly opinionated - but it’s also easy to opt out of any rule you don’t agree with.
FWIW, I haven’t used a linter yet where I agreed with every suggestion it made. :)
@sanmai-NL commented on GitHub (May 22, 2020):
I fully agree that this ought to be solved. @DavidAnson, it's important for a linter to be correct, not just opionated. Opinion is fine, as long as it's based on some authoritative sources. In addition, a linter should provide value in steering towards best practices, not just steering around. When these are parameters requiring manual tuning, the cost-benefit ratio of using this tool is impacted negatively.
I also agree with @PeterConstable that editorial stylistic rules are beyond the purview of a linter for a formal language.
I did not find authoritative sources that reject terminal question marks in headings or titles in general. See e.g. https://www.thepunctuationguide.com/question-mark.html.
For me, it is important to be able to write question marks for FAQ entries, which occur regularly in the educational materials I create.
@PeterConstable commented on GitHub (May 22, 2020):
@sanmai-NL : I just discovered that if the question in a heading is italicized—so wrapped in _ ... _—then that keeps this linter from complaining.
However, I still think a linter shouldn't be functioning like a content-language copy editor or proofing tool.
@DavidAnson commented on GitHub (May 22, 2020):
Thanks everyone for the feedback!
To respond to a couple of points above:
-+*) as well as reasonable list numbering (1, 2, 3). Neither is required for correctness, but both are exactly the kinds of things I look to a linter to highlight.Thinking about whether or not question marks and exclamation points belong in a heading, I would cite the same resource used above:
Note that headings are not a recommended scenario for either form of punctuation according to that guide. To be fair, it's not called out as being wrong, but none of the examples recommend a question or exclamation as part of a title.
It seems relevant to note that the use of these punctuation marks is so often abused that there are articles about the problem and names for the phenomenon:
Again, that's not to say that it's always inappropriate to use a question mark or exclamation mark in a heading, but it does provide a certain justification that they are frequently misused and therefore that it's probably worth a second look when they show up in this context.
There is no "right" or "wrong" here, and I do strive to make sure the rules are consistent with general practice. This issue has come up enough that I may remove them in a future release, but I did want to explain a bit more about why they're still included today.
@PeterConstable commented on GitHub (May 22, 2020):
Style enforcement for the markup language is not in question. The issue is about style enforcement in the content language.
Whether or not Betteridge or anybody else with editorial opinions believes that punctuation marks don't belong in headings or titles, there are plenty of content authors that will nonetheless use them in headings or titles. Linting a markup language and proofing/copy editing content are two completely different things and should be handled separately.
@sanmai-NL commented on GitHub (May 23, 2020):
No authoritative source categorically rejects question marks in headings. Indeed, The Punctuation Guide only confirms its wide applicability, not only as sentence boundary (terminal punctuation), but even within sentences.
¿Cómo abordará las preguntas en español, entonces?
@PeterConstable commented on GitHub (May 23, 2020):
Even if some editorial authority did categorically reject question marks in headings, a tool for enforcing that should be advertised as a tool for enforcing those content requirements, not as a tool for markup-language requirements.
@sanmai-NL commented on GitHub (May 23, 2020):
@PeterConstable I fully agree with your angle. Actually, the whole no-terminal-punctuation should be abolished then.
@ssbarnea commented on GitHub (Jun 3, 2020):
I am looking forward to get this addressed, is really annoying.
@DavidAnson commented on GitHub (Jun 3, 2020):
@ssbarnea If this detail is bothering you, you can disable the rule or change the list of punctuation it is looking for. There is no need to wait for an update to the library.
@jamescoleuk commented on GitHub (Jun 4, 2020):
David can I just say thank you for maintaining this and engaging as you
have done. 🙏 I remain quite certain the rule is overstepping its bounds
and annoyingly high-lighting something that is 100% not a problem. I'd
still like it to highlight full stops and commas, so it's a useful rule to
me and I don't wish to disable it. But it's your library and I respect your
right to make these decisions. Thanks again.
On Wed, 3 Jun 2020 at 17:12, David Anson notifications@github.com wrote:
@yordis commented on GitHub (Nov 8, 2020):
I always find myself using the question mark
?in my headers all the time, as many others https://github.com/aip-dev/google.aip.dev/blob/master/README.md#have-an-idea-for-an-aipFor example, one that I use all the time
## What's next?to direct and help people what to do next.Personally, I find this rule quite annoying, and I agree about not having multiple sentences in the header, but removing these symbols doesn't make sense to me.