-
Notifications
You must be signed in to change notification settings - Fork 110
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 bad linebreaks linter+fixer #269
Conversation
db16e99
to
828359e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good :-) lots of empty line padding tho, makes it a bit hard to read.
Thanks @ctcpip! When I was manually regex fixing this I noticed that I got false positive match on code blocks (I had copied some code that the speaker had pasted into Matrix, so the notes would have the relevant context). Maybe we can detect "```" blocks and ignore them. Long term feels like we should use a proper markdown parser in case there are other cases? |
Just a suggestion. May be following could work: Config provided in this discussion will work to flag the hard wrap cases. Auto fixing, for this case, would require a separate script which could get the locations from the logs. |
sir, please. these are my emotional support linebreaks |
ah yes...
right now, this code will collapse the first two lines. so in this case, I think the fix to appease this linter will be:
not ideal, but an acceptable trade-off. agree implementing this with a proper lexer would be a lot better |
828359e
to
bb8bc38
Compare
I've addressed all comments that I'm willing to address 😄 I'll follow on with a PR to fix the linting errors |
bb8bc38
to
ffbf1cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also was serious about the excessive blank line paddings :-p
ffbf1cc
to
227a36b
Compare
tests would be nice, if someone wants to have a go 😃 .. otherwise I'll get to it eventually... probably...