Skip to content

Releases: textlint-rule/textlint-rule-prh

3.1.2

15 Oct 17:04
@azu azu
Compare
Choose a tag to compare
3.1.2

3.1.1

14 Jun 16:35
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • npm: downgrade untildify@2 (bbc323d)

3.1.0

13 Jun 03:41
@azu azu
Compare
Choose a tag to compare

Features

3.0.1

20 Apr 07:26
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • npm: npm run build as production (067fe38)

3.0.0

20 Apr 07:12
@azu azu
Compare
Choose a tag to compare

Breaking Change

Report error correctly when pattern starts with expected value #8


Problem

textlint-rule-prh does not report an error with a text "(図1) " and the following rule:

  # 全角括弧前後の空白を除去
  - expected: 
    pattern: /) | )/

Note: prh does fix the error with this rule.

Cause

This is because the following condition incorrectly ignore the error.

               // Avoid accidental match(ignore case, expected contain actual pattern)
               if (slicedText.indexOf(expected) === 0) {
                   return;
               }

In this case, variables have the following values.

  • slicedText: ') '
  • matchedText: ') '
  • expected: ')'

I understand that the condition is introduced by f528e78 and cd739dc to fix s/Web/Web/i problem and s/ベンダ/ベンダー/ problem. But prh itself does not handle s/ベンダ/ベンダー/ problem, i.e. prh corrects ベンダー to ベンダーー. So, I think s/ベンダ/ベンダー/ problem should be handled by rule (or changing prh's behavior). I believe incompatibility between prh and textlint-rule-prh is confusing.

Implementation

  • Handle only s/Web/Web/i problem by code.
  • Handle s/ベンダ/ベンダー/ problem by rule.

This fix the s/) /)/ problem.

2.4.1

09 Mar 07:17
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • npm: add peerDependencies (47c85e5)

2.4.0

05 Mar 14:47
@azu azu
Compare
Choose a tag to compare

Features

  • fixer support #6

2.4.0-0

04 Mar 01:04
@azu azu
Compare
Choose a tag to compare
2.4.0-0 Pre-release
Pre-release

Features

  • fixer: add fixer support (387edf1)

2.3.0

23 Jan 14:28
@azu azu
Compare
Choose a tag to compare

Features

  • rule: support ruleContents options (2e81335)

2.2.1

01 Jan 15:27
@azu azu
Compare
Choose a tag to compare

Bug Fixes

  • src: fix to break rulePaths when use multiple rule files (1cb3e34)