textlint-rule / textlint-rule-rousseau

textlint rule check english sentence using rousseau
MIT License
7 stars 0 forks source link

doesn't work for plain text files #1

Closed io-monad closed 8 years ago

io-monad commented 8 years ago

This is the same issue as https://github.com/azu/textlint-rule-no-doubled-joshi/issues/9

This issue is just to remark that testing is needed. Please close this issue if unnecessary.


This rule doesn't work for plain text files.

$ echo 'So the cat was stolen.' > test.txt
$ textlint --rule rousseau test.txt
$
# No warnings output from textlint

It works for the same sentence in markdown files.

$ echo 'So the cat was stolen.' > test.md
$ textlint --rule rousseau test.md
/Users/io-monad/test.md
  1:1   error  suggestion(so) omit 'So' from the beginning of sentences  rousseau
  1:12  error  warning(passive) "was stolen" may be passive voice
Suggestions:
=> stole        rousseau

✖ 2 problems (2 errors, 0 warnings)

Tested with textlint 5.7.0 and textlint-rule-rousseau 1.3.2

Thanks.

io-monad commented 8 years ago

Tested the fix by txt-to-ast 1.1.0 and got correct output as well.

$ echo 'So the cat was stolen.' > test.txt
$ textlint --rule rousseau test.txt
/Users/io-monad/test.txt
  1:1   error  suggestion(so) omit 'So' from the beginning of sentences  rousseau
  1:12  error  warning(passive) "was stolen" may be passive voice
Suggestions:
=> stole        rousseau

✖ 2 problems (2 errors, 0 warnings)

Thanks for quick fix!