Skip to content

Commit

Permalink
fix: OCR regexp
Browse files Browse the repository at this point in the history
fix #252
  • Loading branch information
Tsuk1ko committed Sep 9, 2023
1 parent 910fc15 commit 76ee465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/Hr.vue
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ export default defineComponent({
},
OCRBlackCharRegexp() {
const whitelist = _.uniq(Object.keys(this.enumTagMap[this.OCRServer]).join('')).join('');
return new RegExp(`[^${whitelist}]`, 'g');
return new RegExp(`[^${_.escapeRegExp(whitelist).replace(/-/g, '\\-')}]`, 'g');
},
hr() {
return _.clone(this.characterList).sort((a, b) => b.star - a.star);
Expand Down

0 comments on commit 76ee465

Please sign in to comment.