ligasgr / intellij-xquery

Plugin to support XQuery in Intellij Idea
Apache License 2.0
35 stars 23 forks source link

'declare function' not being syntax highlighted when editing a function above it #181

Closed rhdunn closed 8 years ago

rhdunn commented 8 years ago

Given:

declare function test1($a) {
    <a>
       <b type="test">hello</b>
    </a>
};

declare function test2() {
    ()
};

()

In the type="test" attribute:

  1. change the test content to {}
  2. between the braces, enter " then " (so test is now {""})

After (2), declare function is now highlighted as identifiers, not keywords.

NOTE: This is in usage such as:

<b type="{if ($a) then "one" else "two"}">

Some other observations:

  1. Removing the outer <a> elements and repeating the tests do not exhibit the above behaviour.
  2. Removing the parameters in test1 (i.e. declare function test1()) and repeating the tests do not exhibit the above behaviour.
ligasgr commented 8 years ago

Should be fixed by https://github.com/ligasgr/intellij-xquery/issues/178