
Hi all!
If you try to assign the new ActiproSoftware.Text.Languages.Xml.Implementation.XmlSyntaxLanguage to a document with existing (invalid XML) header / footer text you will get an Index out of range exception.
You can reproduce this by adding follwing lines in the SdiCodeEditor/MainControl.cs at the SetLangguage method before the "// Load the language"
-------------------------------
editor.Document.SetHeaderAndFooterText(@"Option Explicit On
Option Strict On
Option Infer On
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.Linq
Imports System.Text
Imports System.Text.RegularExpressions
Imports VI.Base
Imports VI.Base.JobProcessing
Imports VI.DB
Imports VI.DB.Entities
Imports VI.DB.Sync
Imports VI.DB.Model
Imports VI.DB.Scripting
#If Not SCRIPTDEBUGGER Then
<Assembly: System.Reflection.AssemblyVersion(""1.0.7275.19004"")>
<Assembly: System.Reflection.AssemblyFileVersion(""1.0.7275.19004"")>
#End If
Namespace SyntaxEditScript
Public Class Scripts
Inherits DynScripts.Scripts_zHHSbzHRbjTju88zTFk3Vu6Zsk", @"End Class
End Namespace");
-------------
You can workaround this behavior by clearing header and footer text before you assign the XML Language.
So this behavior is not a big thing...
Kind Regards
Sylko