Skip to content

Remove obsolete highlighting code #544

@mgarstenauer

Description

@mgarstenauer

I suggest removing the orginal (obsolete) syntax highlighting code in the AvaloniaEdit.

Background info:
The original AvalonEdit implementation used its own highlighting engine. AvaloniaEdit instead uses TextMate.
The original highlighting code is still included but not used anywhere. See folder src/AvaloniaEdit/Highlighting.

Pros:

  • AvaloniaEdit.dll shrinks by 25%. 662 KB → 502 KB, measured on Win11, .NET 8, Release build.
  • Maintain/support only the modern highlighting implementation. Remove obsolete/unmaintained/unsupported code path.

Cons:

  • Breaking change.
  • A 1:1 app port from WPF AvalonEdit to AvaloniaEdit will not have syntax highlighting. It is easy to switch to TextMate, but it will not be possible to use custom AvalonEdit XML syntax highlighting definition files (.xshd files).
  • The HtmlClipboard and RichText classes will have to be removed. Most users probably have never heard of these features in AvaloniaEdit. ;)

Let me know what you think! I can provide the PR – the change is fairly trivial.
If not now then maybe we should consider this for v12?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions