tabs not loaded from XML-File

Posted by Cipri on Wed 09 Apr 2003 07:56 AM — 4 posts, 15,858 views.

Netherlands #0
I noticed that using a tab in the `Send to Status` would center the text, and two tabs would right-align the text. So I defined the following trigger to send database dumps centered to the status bar:


<triggers>
  <trigger
   enabled="y"
   match=".*(\*\*\*\* DATABASE SAVE ST.* \*\*\*\*).*"
   omit_from_output="y"
   regexp="y"
   send_to="3"
   sequence="100"
  >
  <send>	%1</send>
  </trigger>
</triggers>


I saved the world, opened the file with notepad, and the tab was saved along with it. Yet when I open the world, the tab has been converted to a space, and the text gets no longer centered. This used to work with my previous version (3.23 I think.)


[edit]
It seems that MushClient's correctly interpreting the \t as a tab when it loads the XML though, so I switched to those to follow the XML Specs. Though the tab stripping is still unspecified and different from how it used to be;)
[/edit]
Amended on Wed 09 Apr 2003 08:10 AM by Cipri
Australia Forum Administrator #1
I'm not sure I ever changed the way XML is saved/loaded. Are you sure that the version that worked was not the pre-XML one (ie. 3.20 or earlier)?
Australia Forum Administrator #2
I'm not sure I want to change anything here. I am defining tabs in the XML file as whitespace, perhaps wrongly. :)

However the \t you mention is not picked up in the XML parse, if you open the trigger you will see it is still there.

However when the trigger text is sent the "backslash" sequences are then acted upon at trigger evaluation time.

It is probably best to use that method anyway, as the difference between a space and a tab can be pretty hard to spot in the GUI interface (and XML file), whereas \t is pretty self-documenting.
Netherlands #3
Yes, the \t aren't parsed, and are actually shown in the Trigger edit window, which indeed is perfect :)
Indeed, with the \t's it's working perfectly, so no change is really needed :)
The only thing that could perhaps be done is change tabs to \t when you save the trigger and give a little popup or something... *shrugs* :)