Gay But Not Narrow (ruakh) wrote in lj_dev,
Gay But Not Narrow

Error in contains the following code:
# if (the current HTML token is a start-tag) {
            my $slashclose = 0;   # If set to 1, use XML-style empty tag marker
            # for tags like <name/>, pretend it's <name> and reinsert the slash later
            $slashclose = 1 if ($tag =~ s!/$!!);
# . . .
#           if ($tag eq "lj-raw") 
                # Strip it out, but still register it as being open
#           if (the tag isn't an LJ-specific tag) {
                $slashclose = 1 if delete $hash->{'/'};
#           }
# . . .
#           if (we're going to send the tag to output) {
                        if ($slashclose) {
                            $newdata .= " /";
                        if ($allow) { 
			    $newdata .= ">"; 
#           }
# }
The code seems to me to be saying that a tag like <code /> should result in $opencount{'code'} being decremented. That seems wrong; $opencount{'code'} should be neither incremented nor decremented, right? (The code seems to think that $opencount{'code'} is already getting incremented somewhere, so it should now decrement it; but that doesn't seem to me to be the case.)

Am I wrong, or is this an error in Thanks for any input!

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment