Tags Bug for CLOSING tags of all types.

Started by Xious, July 07, 2011, 12:14:12 am

Previous topic - Next topic

Xious

I've noticed on-and-off that often, especially when using multiple, nested tags, that the closing tags (/whatever) don't disable the open tag. Let me give today's example... please compare these:

Working:

  • Note that I use C2 and CN2 here, as C1 and CN1 are video-side components the way I do things and I want to maintain consistent notation and references.



                C2 ~1µF         CN2 (RCA Connector)
  • ------------ -)|+ ------|   |------\
    Mixed Sound             |   |       |== RCA Shield
    Output Pin              |---+---------- Central RCA Pin
                                |       |== RCA Shield
      [CE]----------------------|------/
    GND Pad                     
                                             (ASCII/X|S)
    Famicom Audio Amplification Circuit for A/V Conversion


    [li][size=8pt]Note that I use C2 and CN2 here, as C1 and CN1 are video-side components the way I do things and I want to maintain consistent notation and references.[/size][/li]

    [font=courier new]
                    [b] [i]C2[/i] ~1µF         [i]CN2[/i] (RCA Connector) [/b]
    [o]------------ -)|[color=red]+[/color] ------|   |------\
    [b]Mixed Sound[/b]             |   |       |== RCA Shield
    [b]Output Pin[/b]              |---+---------- [b]Central RCA Pin[/b]
                                |       |== RCA Shield
      [CE]----------------------|------/
    [b]GND Pad[/b]                     
                                             (ASCII/X|S)
    [size=8pt]Famicom Audio Amplification Circuit for A/V Conversion [/size]


    ---

    Not Working:


                    C2 ~1µF         CN2 (RCA Connector)
    • ------------ -)|+ ------|   |------\
      Mixed Sound             |   |       |== RCA Shield
      Output Pin              |---+---------- Central RCA Pin
                                  |       |== RCA Shield
        [CE]----------------------|------/
      GND Pad                     
                                               (ASCII/X|S)
      Famicom Audio Amplification Circuit for A/V Conversion [/font]

      Note that I use C2 and CN2 here, as C1 and CN1 are video-side components the way I do things and I want to maintain consistent notation and references.


      [font=courier new]
                      [b] [i]C2[/i] ~1µF         [i]CN2[/i] (RCA Connector) [/b]
      [o]------------ -)|[color=red]+[/color] ------|   |------\
      [b]Mixed Sound[/b]             |   |       |== RCA Shield
      [b]Output Pin[/b]              |---+---------- [b]Central RCA Pin[/b]
                                  |       |== RCA Shield
        [CE]----------------------|------/
      [b]GND Pad[/b]                     
                                               (ASCII/X|S)
      [size=8pt]Famicom Audio Amplification Circuit for A/V Conversion [/size][/font]

      Note that I use C2 and CN2 here, as C1 and CN1 are video-side components the way I do things and I want to maintain consistent notation and references.


      ---

      See that hanging [ / FONT ] tag there? The courier font doesn't close, and nothing that I did would close it. I even opened a new font tag and messed about, only to make things worse. Ive also noticed this happen quite a deal with nested bold, italic and underline tags.

      This breaks:
      This is bold underline[/u] This is normal. This is bold italic.[/i] This is normal.
      [b][u]This is bold underline[/b][/u] This is normal. [b][i]This is bold italic.[/b][/i] This is normal.

      This works:
      This is bold underline This is normal. This is bold italic. This is normal.
      [b][u]This is bold underline[/u][/b] This is normal. [b][i]This is bold italic.[/i] [/b]This is normal.

      the problem gets tricky when the structure is more complex.

      Here is an example of what can happen[/b] with nested tags.
      [u]Here is an [i]example[/i][/u] of what [u][b]can[/u] happen[/b] with nested tags.
      In the above example, the word 'happen' should still be *bold*, but isn't, and I'm left with a floating tag.

      Is this a bug somewhere int he forum software, a glitch that crept in due to a modification, or just a quirk of the BBCode used by this BBS package that can't be cured? Normally, tags should open and remain open until closed, and if you open another tag it will remain until closed, no-matter what other tags are floating open.

      Most of time I can fix this with edit after edit until i find the perfect solution that the software wants, but as in the case of the first (ASCII schematic) example, no-matter what i did the text following the font and size changes wouldn't revert to normal. It was either in the courier font, or in the 8pt size, but not in normal size and in the normal font.  Honestly, it's been bothering me for ages, but I never pointed it out until today as I usually found a work-around... Not today though: It just wanted me to run in circles until i finally gave-in and re-arranged the structure to put my closing remark as a side-bar.

      Yes, I'm aware that this is hardly a priority, but maybe someone could look into this...eventually. Thanks! :bomb:

UglyJoe

Re: The font tag not closing.  This is happening because of the [o] that you put in there.  I haven't got the time now to look over the BBCode parser to see why exactly, and I'm not sure when I'll get around to it.  A hack would be to do [/font][o][font=courier new], which closes the font tag, begins the unordered list, and then reopens the font tag.

Quote from: Xious on July 07, 2011, 12:14:12 am
Here is an example of what can happen[/b] with nested tags.
[u]Here is an [i]example[/i][/u] of what [u][b]can[/u] happen[/b] with nested tags.
In the above example, the word 'happen' should still be *bold*, but isn't, and I'm left with a floating tag.


Actually, you have a syntax error.  Your tags need to be properly nested, just like with HTML.  The correct syntax for the above example is:

Here is an example of what can happen with nested tags.
[u]Here is an [i]example[/i][/u] of what [b][u]can[/u] happen[/b] with nested tags.

Xious

I understand it's unorthodox syntax, but many parsers handle that. As I said, I know how to correct that. I'll try the trick with the font sometime... I also noted that  [ LIST ] dis not indent that part of the post, but [ Li ] did, even though LIST seems to work elsewhere. The parser is just very, overly-picky it seems.

Another oddity I've noted is that a close tag can sometimes close two open tags. If you use bold and underline (or ) italic and underline, and close both, sometimes you end up with a hanging [ /i ], and when you remove the hanging tag, both formatting issues remain closed by one [ /u ] tag. it's just odd, and I was womdering if perhaps there was a patch or fix for whatever SW you're using that would fix this without breaking everything else.

I guess I can keep wishing.

As a side-curiosity, I need one person that can do a set of tie-in scripts using  PHP, Perl and MySQL. What I need is a cart script in Perl that parses the database my catalogue uses and generates a cart form from it, using the fields already in place in the SQL database, and then to add a module for the SW that I use in PHP that toes into the script to place the add to cart button on each entry and adds a view/modify/checkout protocol.  :pow:

One customer promised to do it for me, and I even gave him a huge discount on an order plus a couple-hundred in goodies to do it and he flaked. Do you know anyone that'd do this in trade for vintage hardware; and/or a cut of my sales via the cart (limited duration of 1-year preferred)? I can do some PHP stuff, but I'm not very SQL-oriented and I haven't touched Perl for two-versions or better. Beyond thst, I barely have time to breathe, and everyone wants on-line ordering.

If you know someone who.d be interested, please let me know. (Or if you, someone reading this, are interested, please P.M. me.) It would help out a lot for the people who can.t remember how to use a phone. :bomb: