-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add newline option, resolves #5 #6
Conversation
Looks cool! How about, accepting something an object with the following properties.
If a string is passed in instead, treat it as That way the current system keeps working, plus we add a lot more extensibility! |
I'm not sure about the benefits. The current solutions allows for three distinct values of the Btw. there is currently no value checking of the preferred variable. Shouldn't there be an error if the user configured |
The current system allows a number to be passed in, defaulting ( Would it be reasonable to expect people to want to use |
I worked on this a bit and I feel the How about |
@ThomDietrich Friendly ping! |
Hey @wooorm, deeply sorry for beeing the bad conversation side for once ^^ I'm currently on vacation and will have another look at this next week, including adding my thoughts to your questions. Best! ;) |
Have fun on your holiday! No worries! |
@ThomDietrich Friendly ping! |
I've not forgotten about this :( sorry for the long delay and thanks for keeping up the spirit. Regarding your comments: The goal of my addition is to check for at least one line break between sentences. The reason for that is, so that markdown paragraphs can be managed with git and GitHub in a meaningful way (see here for a good discussion with pros and cons). In our documentation projects we decided to go with the "newline" rule in the style guide and it turned out to be quite helpful. The rule should hence identify everything that is not "sentence newline* sentence".
All three options should ignore multiple line breaks, as that is a valid markdown element. How do we want to deal with tabs? Imho they should be treated as an error. |
@wooorm wdyt? |
Previously, spaces between sentences where checked, and warned about if they did not match the given preferred size. Now, some people like newlines between sentences. Which makes sense. But the previous code did not allow for that. These changes, based on GH-5 and GH-6, adds support for checking that spaces are *not* used between sentences. Additionally, errors are thrown for out-of-range values (lower than 0 or higher than 2), and non-number values. Note however that this plugin only checks white-space consisting of just spaces between sentences. It doesn’t check other delimiters (such as tabs, newlines, or mixed white-space). Closes GH-5. Closes GH-6. Co-authored-by: Thomas Dietrich <[email protected]>
I’m so sorry this slipped through the cracks for one and a half year 😢 |
Resolves #5
Feel free to adapt as you see fit.