textlint-rule / textlint-rule-en-capitalization

textlint rule that check capitalization in english text.
MIT License
4 stars 3 forks source link

False positives in urls #10

Closed czikus closed 3 years ago

czikus commented 3 years ago

The following sentence in a text file:

This is a sentence: https://google.com//search?q=something
                                               ^^^^^^^^^^^

generates:

 9  48 error    en-capitalization Paragraph: Follow the standard capitalization rules for American English.
 See https://owl.english.purdue.edu/owl/resource/592/01/ (textlint)
azu commented 3 years ago

Probably, the reason of this error come from sentence-splitter bug. https://github.com/azu/sentence-splitter/issues/22

azu commented 3 years ago

I can not reproduce it in markdown. textlint's Markdown parser https://google.com//search?q=something as Link node and it will be ignored.

image

If the URL is written as plain text, it is an expected error. If you want to avoid this error, you need to write the URL as Link node or Code node.

In markdown:

<https://google.com//search?q=something>
https://google.com//search?q=something // probably auto-linked
`https://google.com//search?q=something` // this is code

If I missed, please re-open this issue.