Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vBulletin-style [list] tags #5

Open
ackwell opened this issue Nov 15, 2015 · 4 comments
Open

vBulletin-style [list] tags #5

ackwell opened this issue Nov 15, 2015 · 4 comments

Comments

@ackwell
Copy link
Owner

ackwell commented Nov 15, 2015

As per @marksyzm's suggestion, [list] tags should be implemented with a parameter to designate the type and styling of the list (e.g. [list=1] for list-style-type: decimal;, and so on.)

@marksyzm
Copy link
Contributor

This is worth a look :) https://www.vbulletin.org/forum/misc.php?do=bbcode

I'll see if I can fit in some time tomorrow but shout if you've started on this already

@marksyzm
Copy link
Contributor

Yeah just noticed that phpbb use it too: https://www.phpbb.com/community/faq.php?mode=bbcode

These are the main 2 forum operators you see around the web. I run www.teoti.com and have done for about 8 years now and that was converted from vBulletin to a bespoke set up and is rewritten at the moment, and the other guy ran it for 5 years before that :)

@marksyzm
Copy link
Contributor

marksyzm commented Jan 7, 2016

So here's what I've got worked out - either one of 3 things. Either:

  • We need take out the list block regex check altogether along with the entire block for formatting, and create an option for a particular tag of any string i.e. [*], [li] that gives the same behaviour as non breaking tags in <p> in HTML5 - you just check that the next match is either of the same string i.e. another [*] tag or a closing tag of any sort. This would be difficult when it comes to finding open/close tags within a list though, so certainly not perfect.
  • We add an option to a tag to indicate that its contents have the breaking behaviour where a matching tag or closing tag starts a new tag. I think to get this sweet spot, we would have to make the first point optional. OR...
  • We implement proper HTML markup, where some tags behave as non-breaking tags. So a [*] tag or a [li] tag with no closers will simply create a non-self closing <li> tag, so we could just do this:
[list=1]
[*]This is my list
[*]Of stuff
[/list]

And that becomes:

<ul>
<li>This is my list
<li>Of stuff
</ul>

And that is, in fact, perfectly valid markup according to the W3C standard.

I'd go with option 3 😀

@marksyzm
Copy link
Contributor

marksyzm commented Jan 7, 2016

I think that would also fix #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants