InvalidOperationException: A highlighting span matched 0 characters, which would cause an endless loop. Change the highlighting definition so that either the start or the end regex matches at least one character. Start regex: (?<=(?<=([^\\]|^)(\\\\)*)`\|) End regex: ($|$ ) StackTrace: 在 ICSharpCode.AvalonEdit.Highlighting.HighlightingEngine.HighlightLineInternal() 在 ICSharpCode.AvalonEdit.Highlighting.HighlightingEngine.HighlightLine(IDocument document, IDocumentLine line) 在 ICSharpCode.AvalonEdit.Highlighting.DocumentHighlighter.HighlightLine(Int32 lineNumber) 在 ICSharpCode.AvalonEdit.Highlighting.HighlightingColorizer.ColorizeLine(DocumentLine line) 在 ICSharpCode.AvalonEdit.Rendering.DocumentColorizingTransformer.Colorize(ITextRunConstructionContext context) 在 ICSharpCode.AvalonEdit.Highlighting.HighlightingColorizer.Colorize(ITextRunConstructionContext context) 在 ICSharpCode.AvalonEdit.Rendering.ColorizingTransformer.Transform(ITextRunConstructionContext context, IList`1 elements) 在 ICSharpCode.AvalonEdit.Rendering.VisualLine.RunTransformers(ITextRunConstructionContext context, IVisualLineTransformer[] transformers) 在 ICSharpCode.AvalonEdit.Rendering.TextView.BuildVisualLine(DocumentLine documentLine, TextRunProperties globalTextRunProperties, VisualLineTextParagraphProperties paragraphProperties, VisualLineElementGenerator[] elementGeneratorsArray, IVisualLineTransformer[] lineTransformersArray, Size availableSize) 在 ICSharpCode.AvalonEdit.Rendering.TextView.CreateAndMeasureVisualLines(Size availableSize) 在 ICSharpCode.AvalonEdit.Rendering.TextView.MeasureOverride(Size availableSize) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 在 System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.Controls.DockPanel.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.Controls.Control.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint) 在 System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 在 System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) 在 System.Windows.Controls.Grid.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.Controls.Border.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.Controls.Control.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) 在 System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) 在 System.Windows.Controls.Grid.MeasureOverride(Size constraint) 在 System.Windows.FrameworkElement.MeasureCore(Size availableSize) 在 System.Windows.UIElement.Measure(Size availableSize) 在 System.Windows.ContextLayoutManager.UpdateLayout() 在 System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) 在 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() 在 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) 在 System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) 在 System.Windows.Interop.HwndTarget.OnResize() 在 System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) 在 System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) 在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) 在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) 在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)