Skip to content

Commit

Permalink
fix: support valid colon for require-description-complete-sentence ru…
Browse files Browse the repository at this point in the history
…le (#98)
  • Loading branch information
blond authored and gajus committed Oct 23, 2018
1 parent 175ef6d commit dc2f86f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/rules/requireDescriptionCompleteSentence.js
Expand Up @@ -10,7 +10,7 @@ const extractSentences = (text) => {

// Remove all {} tags.
.replace(/\{[\s\S]*?\}\s*/g, '')
.split(/[.?!:](?:\s+|$)/)
.split(/[.?!](?:\s+|$)/)

// Ignore sentences with only whitespaces.
.filter((sentence) => {
Expand Down
10 changes: 10 additions & 0 deletions test/rules/assertions/requireDescriptionCompleteSentence.js
Expand Up @@ -533,6 +533,16 @@ export default {
*/
function quux () {
}
`
},
{
code: `
/**
* Hello: world.
*/
function quux () {
}
`
}
Expand Down

0 comments on commit dc2f86f

Please sign in to comment.