icsharpcode / AvalonEdit

The WPF-based text editor component used in SharpDevelop
http://avalonedit.net/
MIT License
1.85k stars 469 forks source link

Add support for custom link regexes via TextEditorOptions. #399

Open Quogu opened 1 year ago

Quogu commented 1 year ago

My use-case is that I would like hyperlinks to be able to have semicolons and commas in and still parse.

During the implementation of this PR, I realised that there is another extensibility point, subclassing LinkElementGenerator and then adding it to the TextView.ElementGenerators collection, but I found this hard to discover without first digging into the code, and I think there's still potentially value in exposing this property more easily via TextEditorOptions. That being said, I can understand if you don't want to accept the PR as a result of this.