rouge icon indicating copy to clipboard operation
rouge copied to clipboard

Some sed code take very long time to be highlighted

Open mikecat opened this issue 1 year ago • 0 comments

Name of the lexer

sed

Code sample

:tthousand
s/d\(.*\)0\(...\)$/\11\2/
s/d\(.*\)1\(...\)$/\12\2/
s/d\(.*\)2\(...\)$/\13\2/
s/d\(.*\)3\(...\)$/\14\2/
tthousand

Additional context

When I tried this code on Rouge, it took about 7 seconds to be highlighted.

Adding more s/d\(.*\)3\(...\)$/\14\2/ lines look making it take much more time. (I added one more line and did't get response in several minutes)

mikecat avatar Jun 23 '24 04:06 mikecat