Index out of range exception in new XML language

SyntaxEditor Web Languages Add-on for Universal Windows Forum

Posted 4 years ago by Sylko Zschiedrich
Version: 19.1.0341
Avatar

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

Comments (1)

Posted 4 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Thanks for reporting this.  We've fixed it for the next maintenance release.


Actipro Software Support

The latest build of this product (v22.1 build 0365) was released 5 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.