-
Beta Was this translation helpful? Give feedback.
Answered by
gsantner
Sep 11, 2023
Replies: 2 comments 6 replies
-
For syntax highlighting links a rather short regex is used for performance reason.
For rendering "view mode" of course something better is in place. Highlighting should be instant while the other can take the time it needs.
As you wrote about ftp, http and WEB_URL I guess you have an rough idea how many variations and rules there are.
And stuffing every rule into regex comes at expense of performance. So the current approach is rather a relaxed detection with a low performance penalty.
I rather have something that fast highlights 90% fine and 10% wrong then 99% fine and slow.
If you can find something better not too complex it would be fine.
Hope it answers all questions :).
|
Beta Was this translation helpful? Give feedback.
4 replies
-
The URL highlighting in edit mode is really obnoxious, since it changes text dimensions and makes it harder to read. I'd really just rather not have it. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@TimReset Seems like a different pattern might suit better. But as you can see, even a very clever pattern where many people put their mind on it...may fail 😄 .