Skip to content

Commit

Permalink
Ensure Hyperbole only flags actual words
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jan 3, 2020
1 parent 3823226 commit ea64c1a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
10 changes: 9 additions & 1 deletion features/rules.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Feature: Rules

Scenario: Cliches
Scenario: Rules about punctuation
When I test "punctuation"
Then the output should contain exactly:
"""
test.md:3:17:proselint.Hyperbole:'idea!!' is hyperbolic.
test.md:8:23:proselint.Hyperbole:'here!!' is hyperbolic.
"""

Scenario: Basic tests
When I test "basic"
Then the output should contain exactly:
"""
Expand Down
6 changes: 6 additions & 0 deletions fixtures/punctuation/.vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
StylesPath = ../../

MinAlertLevel = suggestion

[*.md]
proselint.Hyperbole = YES
8 changes: 8 additions & 0 deletions fixtures/punctuation/test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Introduction

This is a great idea!!

!!! important
the important text

Another sentence goes here!!
3 changes: 1 addition & 2 deletions proselint/Hyperbole.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ message: "'%s' is hyperbolic."
level: error
nonword: true
tokens:
- '[a-z]*[!]{2,}'
- '[a-z]*\?{2,}'
- '[a-z]+[!?]{2,}'

0 comments on commit ea64c1a

Please sign in to comment.