Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Tag closing

IDKIDK Member Posts: 1,784
Sometimes some people forget to close their formating tags, and that looks wierd.
Isn't it possible to check for those things and fix them when posting.

Just becouse this is a programming board, here's some psuedo (I don't know asp):
[code]
push 0 on stack
while not end of document{
scan untill finding a tag.
if tag is a closing tag{
if tag is equall to the tag on top of stack then pop the stack
else{
for(i = 0; stack[top - i] == 0; ++i){
if tag is equall to stack[top - i]{
stack[top - i] = 1;
break;
}
}
}
} else {
push tag on stack
}
}
while stack isn't empty{
pop tag
if tag is not equall to 0 or 1 then add closing tag to document
}
[/code]

LOL!! :-)

Happy coding wishes
the one and only
[b]Niklas Ulvinge[/b] [white]aka [b]IDK[/b][/white]

Comments

  • WEBMASTERWEBMASTER Member Posts: 549
    Hi

    The next version of the forum that will be released later this year will have protection for that.


    [blue][italic][b]/WEBMASTER[/b][/italic][/blue]

  • IDKIDK Member Posts: 1,784
    : Hi
    :
    : The next version of the forum that will be released later this year will have protection for that.
    :
    :
    : [blue][italic][b]/WEBMASTER[/b][/italic][/blue]
    :
    :

    Jippi :-)
Sign In or Register to comment.