Support .properties

This commit is contained in:
ema
2025-06-22 23:31:59 +08:00
parent cf0c8529a0
commit e86716fc54
6 changed files with 264 additions and 2 deletions

View File

@@ -23,6 +23,7 @@ using QuickLook.Common.Helpers;
using QuickLook.Common.Plugin;
using QuickLook.Plugin.TextViewer.Detectors;
using QuickLook.Plugin.TextViewer.Themes;
using QuickLook.Plugin.TextViewer.Themes.HighlightingDefinitions;
using System;
using System.IO;
using System.Reflection;
@@ -183,6 +184,14 @@ public partial class TextViewerPanel : TextEditor, IDisposable
: highlighting.SyntaxHighlighting;
Document = doc;
if (SyntaxHighlighting is ICustomHighlightingDefinition custom)
{
foreach (var lineTransformer in custom.LineTransformers)
{
TextArea.TextView.LineTransformers.Add(lineTransformer);
}
}
if (highlighting.IsDark)
{
Background = Brushes.Transparent;