Merge pull request #940 from kuangshen04/PR-Branch

修复某处正则的兼容性问题
This commit is contained in:
Spmario233 2024-02-14 00:21:34 +08:00 committed by GitHub
commit 1de79a9d7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -2251,7 +2251,11 @@ export class Get extends Uninstantable {
}
numStr = numStr.replace(/(?=(\d{4})+$)/g, ',').split(',').filter(Boolean);
const handleZero = str => str.replace(/零{2,}/g, '零').replace(/(?<=.+)零+$/g, '');
const handleZero = str => {
let result = str.replace(/零{2,}/g, '零');
if (result.length > 1) replace(/零+$/g, '');
return result;
};
const _transform = str => {
if (str === '2' && !ordinal) return '两';
let result = '';