https://bugs.kde.org/show_bug.cgi?id=373713

            Bug ID: 373713
           Summary: JavaScript Syntax Highlighting broken when using E4X
           Product: kate
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: syntax
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: andreas.schw...@cardcontact.de
  Target Milestone: ---

E4X allows embedding XML fragments in JavaScript files. We use that extensively
in the OpenSCDP project, which is based on the Rhino JavaScript engine.

Unfortunately JS syntax highlighting for regular expressions is triggered at
xml tags in the source code.

E.g. "var p = <p>Hello World</p>"

would trigger context "(regex caret first check)" at the </p> tag.

The suggested fix is to add

<Detect2Chars attribute="Normal Text" context="NoRegExp" char="&lt;" char1="/"
/>
<Detect2Chars attribute="Normal Text" context="NoRegExp" char="/" char1="&gt;"
/>

before

<DetectChar attribute="Regular Expression" context="(regex caret first check)"
char="/" />

in javascript.xml syntax file

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to