WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   LUA Comments in XML files (https://www.wowinterface.com/forums/showthread.php?t=2663)

Ravendwyr 12-16-05 05:38 AM

LUA Comments in XML files
 
I know that to make a comment in an XML file you surround it with <!-- text -->, but what about comments with "--" before them?

f.i.
Code:

<Scripts>
 <OnLoad>
  -- call the On Load function
  TestMod_OnLoad();
 </OnLoad>
 <OnEvent>
  -- call the On Event function
  TestMod_OnEvent(event);
 </OnEvent>
</Scripts>

Are they legit comments? If so, is it possible to make them appear green, like the other comments?
If they're not comments, then I'd better get rid of them :)

Nulkris 12-16-05 05:53 AM

They are legitimate. I have started writing a new syntax highlighter for handling Lua in XML, but actually getting it in and working is somewhere behind Lua autocomplete, editor enhancements, UI designer Undo and other stuff I can't think of atm....

So just pretend its green for now, thanks.

Gaal 12-16-05 11:05 AM

Yes, you can use the comment handler at least for most of the XML lines as well, providing you're referencing a LUA file (I believe). I've only had a few cases where this didn't work, and that's when not using a LUA file on the side. I also found the LUA commenter doesn't seem to work in the middle of XML items like it does in real LUA files.


All times are GMT -6. The time now is 09:15 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI