Closed iibrat closed 5 months ago
I have never touched WeChat Mini program, but Unicode character class escape: \p{...}, \P{...} error seems to be there.
Can you tell me the result of running the following code on WeChat Mini program?
/^\p{Uppercase_Letter}/u.test("AAA");
// This one will probably give an error on wechat mini program
and
/^\p{General_Category=Uppercase_Letter}/u.test("AAA");
// I'd like to know the result of this one
📝 In specification, General_Category=
can be omitted, but JS engine of WeChat Mini may treat it as different.
It works fine when I downgrade to version 3.2.3. Thinks! I don't know why my cloud development environment has to limit the Node.js version to 12.
/^\p{Uppercase_Letter}/u
is introduced in https://github.com/textlint-rule/sentence-splitter/releases/tag/v4.4.0
Describe the bug I apologize, I am learning and developing at the same time. I am not sure how to solve this problem. If you are willing, please help me take a look.
WeChat Mini Program Android error: Invalid regular expression: /^\p{Uppercase_Letter}/u: Invalid property name。 iOS OK。
import { split } from 'sentence-splitter'
this.actionSegment.sentences = split(this.actionSegment.content) // 切割句子
<SyntaxError: Invalid regular expression: /^\p{Uppercase_Letter}/u: Invalid property name> SyntaxError: Invalid regular expression: /^\p{Uppercase_Letter}/u: Invalid property name at new RegExp ()
at isCapitalized (https://usr/appservice.app.js:16071:10))
at AnyValueParser.seek (https://usr/appservice.app.js:16041:24)
at AbbrMarker.mark (https://usr/appservice.app.js:16166:11)
at https://usr/appservice.app.js:16042:27
at Array.forEach (
at SourceCode.seekNext (https://usr/appservice.app.js:15869:14)
at SplitParser.nextValue (https://usr/appservice.app.js:16320:48)
at Object.split (https://usr/appservice.app.js:16415:19)
at https://usr/appservice.app.js:16810:58