orangain / textlint-plugin-review

textlint plugin to lint Re:VIEW documents
https://www.npmjs.com/package/textlint-plugin-review
Other
13 stars 5 forks source link

Ruby tags are not interpreted properly. #24

Closed huideyeren closed 3 years ago

huideyeren commented 3 years ago

When I was checking the Re:VIEW manuscript with Github Actions, I encountered the following error.

Run npx textlint -f checkstyle chapter/*.re wiki/*.md README.md >> .textlint.log
  npx textlint -f checkstyle chapter/*.re wiki/*.md README.md >> .textlint.log
  shell: /usr/bin/bash -e {0}
✖ Error
The expression evaluated to a falsy value:

  (0, _assert2['default'])(pieces.length === 2)

✖ Stack trace
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  (0, _assert2['default'])(pieces.length === 2)

    at parseRubyTag (/home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/inline-parsers.js:195:27)
    at parseText (/home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/inline-parsers.js:228:18)
    at parseLine (/home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/inline-parsers.js:30:10)
    at /home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/block-parsers.js:211:87
    at Array.forEach (<anonymous>)
    at /home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/block-parsers.js:210:15
    at flushParagraph (/home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/block-parsers.js:214:9)
    at /home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/block-parsers.js:222:7
    at Array.forEach (<anonymous>)
    at parseBlockWithContent (/home/runner/work/XiandaiFenshuVol5/XiandaiFenshuVol5/node_modules/textlint-plugin-review/lib/block-parsers.js:220:48)
Error: Process completed with exit code 1.

The error probably occurred in the ruby processing.

The repository is at the following URL.

https://github.com/huidetang/XiandaiFenshuVol5

Note that the same error occurs in VSCode.

huideyeren commented 3 years ago

I solved it myself.

It seems that there was a grammatical error in the manuscript I wrote, and that's why I was getting errors.

After correcting the error, I confirmed that it worked correctly.