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
[repo] Add markdown lint rule to convert directional quotes to their non-directional variants #104
Conversation
This commit adds a new, custom, markdownlint rule. It is not applied automatically. It is not possible to configure it to run from config from my understanding (deliberate design decision). I think that this is ready but I'll check tomorrow. |
0bfe221
to
5fcdec0
Compare
Okay, this should now be ready. I've rebased it on #106, which adds vscode workspace recommendations and configuration. This allows us to add the markdownlint custom rules into the vscode configuration. There is no way to do this in a nice, easy, way otherwise. |
Hi @lucaboesch, This change should prevent further issues with the use of true apostrophes in markdown files and will automatically fix them. |
That is great news, @andrewnicols! But it should probably look out for ‘ as well (like in https://github.com/moodle/devdocs/blame/main/general/development/process/testing/qa.md#L193). Best, |
Hi @lucaboesch , It specifically is looking for I'm thinking of extending it to fix |
Yeah, @andrewnicols but you see, ‘ is just like ’ typographically. |
Right, thanks Luca, I worked that out a short while ago. IT doesn't help that github eats half the characers unless you put them in backticks. Please ensure that you put these in the relevant backticks in future. |
Okay, this is finally ready for review now that I've worked out all of the kinks. I was looking at moving to markdownlint-cli2, but that's just a different level of pain. |
Brilliant, @andrewnicols ! |
92296c6
to
93bc418
Compare
Left and Right single quotes (`‘` and `’`) are converted to a single quote or apostrophe (`'`). Left and Right double quotes (`“` and `”`) are converted to a double quote (`"`).
93bc418
to
3ae634d
Compare
This has been waiting for review for a week and I really need the infrastructure changes that this provides for some related chagnes. Self-merging when tests finish. |
Hi @andrewnicols! |
In moodle#104 a markdown lint rule has been added to convert directional quotes to their non-directional variants. This patch manually replaces the missing directional quotes.
Related to #102
This should prevent additional use of the following characters:
“
”
‘
’
These will be converted to either
"
or'
as appropriate.