An issue I'm having with UE right now is how it handles code folding for XML documents when encountering self-closing tags. It appears to treat the final /> of the self-closing tag as the closing marker for the most recently opened 'standard' tag. Below is an example. Just paste it into a new document and set syntax highlighting to XML:
Click on the opening 'rules' tag and it shows the closing tag as the /> of the AutoChangeGear line. Click on the 'spellcast' tag and it shows the /> of the LevelRequirement line as being the close. The 'spellcast' to 'LevelRequirement' segment is foldable; the 'rules' to 'AutoChangeGear' is not. The 'equip' tag set below that folds properly.
Given the post about using single quotes in attributes, I tried removing the single quotes from the @name portion, but that didn't have any effect.
Is there a change that could be made in the XML wordfile that would fix this, or is this a genuine bug? Or is there something else I'm missing?
This is a recent problem, but I'm not sure if it first started with the update to 17.30 or not. While I've only rarely used the include tags until recently, I do not recall ever coming across this problem when they were present before. I re-downloaded the xml wordfile from the main site to be sure I had the latest version.
Variant on the code sample:
Clicking on 'xi:include' shows that it recognizes that entire line as its own tag.
Click on <rules> and it marks it as ending with the /> on the AutoChangeGear line (as in the first example).
Click on <spellcast> open tag and it believes that it is closed with the </rules> tag, and folds accordingly.
Code: Select all
<spellcast>
<rules>
<xi:include href="Include.xml" xpointer="//include[@name='AutoChangeGear']/*" />
<xi:include href="Include.xml" xpointer="//include[@name='LevelRequirement']/*" />
<xi:include href="Include.xml" xpointer="//include[@name='ReturnRules']/*" />
<equip when="precast">
<head>remove</head>
</equip>
</rules>
</spellcast>
Given the post about using single quotes in attributes, I tried removing the single quotes from the @name portion, but that didn't have any effect.
Is there a change that could be made in the XML wordfile that would fix this, or is this a genuine bug? Or is there something else I'm missing?
This is a recent problem, but I'm not sure if it first started with the update to 17.30 or not. While I've only rarely used the include tags until recently, I do not recall ever coming across this problem when they were present before. I re-downloaded the xml wordfile from the main site to be sure I had the latest version.
Variant on the code sample:
Code: Select all
<spellcast>
<rules>
<xi:include href="Include.xml" xpointer="//include[@name='AutoChangeGear']/*" />
<equip when="precast">
<head>remove</head>
</equip>
</rules>
</spellcast>
Click on <rules> and it marks it as ending with the /> on the AutoChangeGear line (as in the first example).
Click on <spellcast> open tag and it believes that it is closed with the </rules> tag, and folds accordingly.