Closed donganzh-zz closed 4 years ago
Changes fixed
@azu hello, could you please review my changes? thanks
I have the following sentence where the acronym "AWS" is being reported as unexpanded. Will this PR fix this issue?
This topic describes the process to setup this tool, which you can use for deploying the application on either Azure or Amazon Web Services (AWS)
Hello, any update on this PR?
Hi, @azu As I was using this rule on my documents, I found a bug that if there is a capital letter at the beginning of the sentence and there is an explanation to an acronym right after it, the rule won't extract the right acronym for the comparison. Here is an example:
In this case, previously the rule will extract
IAWS
to compare withAWS
because "the" is anacronymJoiningWords
, which generates an error message.In order to fix it, I first reverse the
AcronymCreater
array and loop using reduce and add the first character to beginning on every iteration and finally join on every iteration and push to result arrayThen check this array using
isWordSatidfy
method and push the good ones toexpandedAcronymList
to compare withAWS
.I added this test case in the
textlint-rule-unexpanded-acronym-test.js
and it passed all the previous test as well.I also update the
array-includes
package to the latest version.Cheers!