Jump to content

Closing all bbCodes with the same tag


Guest Alfrеdo

Recommended Posts

Posted

As that would be pretty neat, it might get far to confusing if you have a few different BBcodes ending at different times on one line of text.

Posted

That is a pattern matching bug ridden nightmare waiting to happen, and I don't see how it would be beneficialunless I'm missing something. Why not just use ?

Posted

Laziness would be a factor I guess, not having to type [/spoiler ], [/color ], ... makes it pretty easy ( [/] is shorter). When nesting tags, you don't need to see in which order they were opened to close them.

Once you've been using the above method, you don't want to go back. :) Though I can understand it may be a nightmare to implement, but it was just a suggestion of course.

Posted

Come on, if you don't allow overlapping tags, it is no issue at all to support. Need I remind you that if you want to succeed in that valid html goal, you can not allow overlapping tags.

Posted

Come on, if you don't allow [b]over[u]lapp[/b]ing[/u] tags, it is no issue at all to support. Need I remind you that if you want to succeed in that valid html goal, you can not allow overlapping tags.



But if we want to succeed in that "pleasing customers" goal, we must allow overlapping tags. Most people who post on forums have little care for what the W3C says the formatting of their post should look like.
Posted

What do you mean by, overlapping tags? Using a list tag inside a colour tag?



Not necessarily, it's when you start 2 tags, but close tag 1 before tag 2.

For example:

[b]Hello ev[i]ery[/b]one[/i]




XHTML doesn't allow this because it's an application of XML which is a strict language and only allows a sort of "tree" structure of elements. HTML is an application of SGML which is not always strict. Technically, if you want to XHTML valid you'd need to do this:

[b]Hello ev[/b][i][b]ery[/b]one[/i]


Which as you can see, is very confusing.

Posted

I see what you mean. Trying to overlap tags at the other forum gives me this result:

[b]Hello every[/b]one

with eryone in italic. Looks like they don't support overlapping tags either then. I've never used them so I wouldn't miss it, but I understand why you can't have both.

[b]Hello ev[i]ery[/b]one[/i]

would become:

[b]Hello ev[i]ery[/]one[/]


Hello everyone
Hello everyone

Posted

I am quite sure that HTML doesn't allow overlapping elements either.
Also, I have yet to find a real use for overlapping elements, in my limited experience, it only looks bad.

Posted

W3C Validator says 2 Errors:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Test Document</title>

</head>

<body>

<b>1<u>2</b>3<i>4</u>5</i>

</body>

</html>



Output:
12345

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...