Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ MXP and Pueblo
➜ Nesting tags, automatic closure
|
Nesting tags, automatic closure
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Wed 06 Jun 2001 04:39 AM (UTC) Amended on Thu 23 Aug 2001 01:24 AM (UTC) by Nick Gammon
|
| Message
| With MUSHclient you can nest elements in your output, each one effectively "saves" its current state and restores it when it closes.
For example:
Normal <i> Italic <b> Bold Italic </b> Italic </i> Normal
This would appear as:
Normal Italic Bold Italic Italic Normal
You can even nest <send> elements although this is not recommended as it may be confusing.
Closure out of sequence
MUSHclient always closes tags in the opposite order that it opened them (thus allowing the reversion to previous styles mentioned previously).
If you try to close styles out of sequence you will get a warning message in the debug window (providing MXP debugging is not "none") and all intervening tags will be closed as well.
For example:
Normal <i> Italic <b> Bold Italic </i> Normal </b> Normal
This would appear as:
Normal Italic Bold Italic Normal Normal
In the above example, the </i> is out of sequence (because the most recent tag was <b>, so the <b> is closed automatically before the <i>.
This situation would generate two warning message:
1. Closing out-of-sequence MXP tag: <b>
2. Closing MXP tag </b> does not have corresponding opening tag
The second message occurs when the </b> tag is reached, because the <b> tag has already been closed it notices that there is no outstanding <b> to close.
Comment. The useful thing about this rule is that if you have something like this:
<rdesc> Room description
... a whole lot of messy tags here ...
</rdesc>
The </rdesc> is guaranteed to close all intermediate tags between <rdesc> and </rdesc>.
Closure of a tag that was never opened
In the event you close a tag that was not previously opened, then nothing happens (except for a warning message).
eg.
blah blah </b>
Because the <b> tag is not present, the </b> will not have any effect.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
6,268 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top