mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #298] No-wrapping—opposite of line length rule MD013 #2101
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#2101
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 @mrmanc on GitHub (Jun 19, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/298
I’m working on a change to MD013 in the Ruby markdownlint project and I’m keen to make the same change to this project since it is this one I actually use. Would you be happy for me to have a go at porting the same change over?
@DavidAnson commented on GitHub (Jun 19, 2020):
I am open to the idea, yes! I would prefer to be consistent across the two projects. However, you will see that this project‘s implementation of the rule already offers additional options over what’s available in the Ruby implementation. It would be nice to reconcile that before committing to either repository so at least the new option is consistent. I don’t mind subsets, but I would prefer to avoid two different ways of expressing the same behavior. Could you share your thoughts about what you think this might look like?
@DavidAnson commented on GitHub (Jun 19, 2020):
Having looked at the Ruby PR a little more, I think it would be ideal to support the proposed behavior in addition to allowing sentence-based wrapping as referenced in the other issue Jay identified. Forcing entire paragraphs on to a single line seems less desirable to me then putting each sentence on its own line. The latter is what I’ve done when writing my blog for about a decade. Adding both at once may help reconcile them with the various approaches that are available today.
@mrmanc commented on GitHub (Jun 23, 2020):
Thanks for your input. Apologies for the slow response.
I think you’ve seen this from the other PR now, but let me know if you want me to go into any more detail.
Agreed. I’ve asked how they would like me to contribute that change over there, so once I’m done with that I can ping you on here? Do you have any more input into what you would like to be supported? Are there any other modes you’d want to consider? I see https://cirosantilli.com/markdown-style-guide/#option-wrap-inner-sentence but I can’t imagine that being very important to support.
@DavidAnson commented on GitHub (Jun 23, 2020):
I think one challenge is how to configure the rule. The Node implementation already has
strictandsternbooleans. The first made sense to add that way and the second was done for consistency, but with more modes being added, I think astyleproperty as you have done makes the most sense. The existing default and properties need to be maintained for backwards compatibility, but I suggest we add all the functionality under the newstyleparameter.I propose the following values:
Ideally these names would match with whatever is implemented by the Ruby version.
Also, I should warn you in advance that I will be pretty picky about how this is done, so if you don’t want to deal with that you might want to wait for me to implement this. :)
@mrmanc commented on GitHub (Jul 6, 2020):
Consistency is a win in my book 😃
Supporting sentence-based wrapping makes sense to me.
Did you mean
strictandsternbooleans? This has been confusing me, as I couldn’t see an existingstyleoption.I’m very comfortable with picky, but thanks for the warning. Happy to follow existing conventions etc and take constructive criticism, so long as it’s kind and takes into account that these aren’t languages I use regularly 😃
I’m going to make a start adding functionality via the Ruby PR. I’ll try to start by establishing parity with the
strictandsternfunctionality currently missing there.If I understand this correctly, you propose changing
not_wrappedtosinglein the existing PR? Happy to do that. I think you’re also proposing changingwrappedtostrict? I need to check the details of what the current functionality is to check that it would matchstrict.Wow, that is an interesting idea. Kinda glad I asked now! No idea how
semanticwould be supported, other than maybe not imposing any style?Supplemental: should society surmise supplemental style strings should solely start
s? 😃@DavidAnson commented on GitHub (Jul 6, 2020):
Yes, sorry for the typo.
Right.
I think the current/default/original behavior maps to what I called “space“ in my list above. I’ve always found it a little bit confusing, but maintained the default and behavior for consistency.
I think it would be a challenge which is why I propose we not deal with it right now.
That was an accident, but now that you point it out, I think it should be codified into law!
@DavidAnson commented on GitHub (Jul 6, 2020):
I’ve corrected this in my post above to avoid confusing anyone else.
@bnb commented on GitHub (Aug 11, 2020):
Huge +1.
@OsirisTerje commented on GitHub (Dec 3, 2023):
@mrmanc Anything happening with this rule ? Would love to see this, like expressed in #502 . Or is this issue fixed by #319 (other repo though) ?
@neumaerker-qm commented on GitHub (Apr 15, 2024):
In our company we set line_length to 250 characters, but it is to short for some sentence I have to write. It is only one sentence with a period at the end. Can I make use of
single (no wrapping, single line - NEW)orsentence (break after period, etc - NEW)and how?@jannis-baum commented on GitHub (Jun 2, 2025):
@DavidAnson Any updates on this?
@DavidAnson commented on GitHub (Jun 2, 2025):
Nope