[GH-ISSUE #51] Proposed rule: enforce typography #42

Open
opened 2026-03-03 01:23:15 +03:00 by kerem · 5 comments
Owner

Originally created by @flodolo on GitHub (Mar 17, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/51

Here's a few checks that I would like to have:

  • quotes: use proper “” instead of "".
  • apostrophes: use proper apostrophes instead of '.
  • punctuation_space: enforce one space after a punctuation symbol, unless it's followed by a new line.
  • double_spaces: no double spaces.

I think code should be excluded by default for all these checks.

For the first two, Atom has a really nice package that might be used as inspiration.

Originally created by @flodolo on GitHub (Mar 17, 2017). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/51 Here's a few checks that I would like to have: * quotes: use proper `“”` instead of `""`. * apostrophes: use proper apostrophes `’` instead of `'`. * punctuation_space: enforce one space after a punctuation symbol, unless it's followed by a new line. * double_spaces: no double spaces. I think code should be excluded by default for all these checks. For the first two, Atom has a [really nice package](https://atom.io/packages/smart-quotes-plus) that might be used as inspiration.
Author
Owner

@DavidAnson commented on GitHub (Mar 17, 2017):

Double spaces was already on my list. :) Punctuation space seems fine.

But quotes worries me. The package you link to changes normal quotes to smart ones - but emphasizes that you still type dumb quotes the easy way. markdownlint is not a transformer like that. I think nobody will want to have to type smart quotes every time in order to satisfy this rule. Or am I thinking about this part wrong?

<!-- gh-comment-id:287395667 --> @DavidAnson commented on GitHub (Mar 17, 2017): Double spaces was already on my list. :) Punctuation space seems fine. But quotes worries me. The package you link to changes normal quotes to smart ones - but emphasizes that you still type dumb quotes the easy way. `markdownlint` is not a transformer like that. I think nobody will want to have to *type* smart quotes every time in order to satisfy this rule. Or am I thinking about this part wrong?
Author
Owner

@flodolo commented on GitHub (Mar 17, 2017):

I think nobody will want to have to type smart quotes every time in order to satisfy this rule. Or am I thinking about this part wrong?

Yes, you would either be writing the correct quotes directly, or use a package like the one above to make your life easier.

I realize that this might not be a useful rule for a lot of users, it sounds more like good material for a custom rule.

<!-- gh-comment-id:287399087 --> @flodolo commented on GitHub (Mar 17, 2017): > I think nobody will want to have to type smart quotes every time in order to satisfy this rule. Or am I thinking about this part wrong? Yes, you would either be writing the correct quotes directly, or use a package like the one above to make your life easier. I realize that this might not be a useful rule for a lot of users, it sounds more like good material for a custom rule.
Author
Owner

@DavidAnson commented on GitHub (Mar 17, 2017):

It fits within the bigger idea of a typography rule, but maybe this part would default to "off". I like the idea to bundle these similar checks, though.

<!-- gh-comment-id:287412190 --> @DavidAnson commented on GitHub (Mar 17, 2017): It fits within the bigger idea of a typography rule, but maybe this part would default to "off". I like the idea to bundle these similar checks, though.
Author
Owner

@CircleCode commented on GitHub (Apr 7, 2017):

Please also note that these rules can depend on text language.
For example, in French

  • you would have to enforce a non breakable space before every double punctuation sign (; : !)
  • valid quotes are « and »
<!-- gh-comment-id:292594542 --> @CircleCode commented on GitHub (Apr 7, 2017): Please also note that these rules can depend on text language. For example, in French - you would have to enforce a non breakable space before every double punctuation sign (`;` `:` `!`) - valid quotes are `«` and `»`
Author
Owner

@kdeldycke commented on GitHub (Jul 2, 2020):

Checks on properly balanced quotes and the way they terminates sentences is what I'n trying to achieve at: https://github.com/sindresorhus/awesome-lint/pull/101 . Only managed to create a set of use-cases at the moment.

<!-- gh-comment-id:653103177 --> @kdeldycke commented on GitHub (Jul 2, 2020): Checks on properly balanced quotes and the way they terminates sentences is what I'n trying to achieve at: https://github.com/sindresorhus/awesome-lint/pull/101 . Only managed to create a set of use-cases at the moment.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#42
No description provided.