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.GetOrConstructVisualLine(DocumentLine documentLine) 在 ICSharpCode.AvalonEdit.Editing.Caret.CalculateCaretRectangle() 在 ICSharpCode.AvalonEdit.Editing.Caret.BringCaretToView(Double border) 在 ICSharpCode.AvalonEdit.Editing.Caret.BringCaretToView() 在 ICSharpCode.AvalonEdit.Editing.TextArea.PerformTextInput(TextCompositionEventArgs e) 在 ICSharpCode.AvalonEdit.Editing.TextArea.PerformTextInput(String text) 在 ICSharpCode.AvalonEdit.Editing.EditingCommandHandler.OnEnter(Object target, ExecutedRoutedEventArgs args) 在 System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e) 在 System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding) 在 System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute) 在 System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute) 在 System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e) 在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 在 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) 在 System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated) 在 System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs) 在 System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e) 在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) 在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) 在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) 在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) 在 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) 在 System.Windows.Input.InputManager.ProcessStagingArea() 在 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) 在 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) 在 System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey) 在 System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled) 在 System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers) 在 System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param) 在 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)