Skip to content

Commit

Permalink
Merge pull request #25 from djytw/master
Browse files Browse the repository at this point in the history
文本去重的改进
  • Loading branch information
tinyAdapter authored Oct 27, 2019
2 parents 80b4ded + 0288c2c commit d5ca353
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/middlewares/TextModifierMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class TextInterceptorMiddleware
if (context.text === '') return
}
if (this.deduplicate) {
context.text = context.text.replace(/(\S+)\1/g, '$1')
context.text = context.text.replace(/(\S+?)\1+/g, '$1')
if (context.text === '') return
}

Expand Down

0 comments on commit d5ca353

Please sign in to comment.