veger / ruby-bbcode

Convert BBCode to HTML and check whether the BBCode is valid
http://rubygems.org/gems/ruby-bbcode
MIT License
28 stars 29 forks source link

Does not allow for implicit closing of [li] items #14

Closed TheNotary closed 10 years ago

TheNotary commented 10 years ago

The below usage would be desirable

[ul]
  [li] blah
  [li] blah
[/ul]

It doesn't work, but could easily, I'll have a pull request for that soon, will be coding from hospital though =/

veger commented 10 years ago

Nothing too serious for you being in the/a hospital hopefully? :(

Your addition sounds like a good idea. Hopefully it can be incorporated into the existing code, without adding too much 'hacks', as it now (fanatically) checks whether tags are properly closed...

I look forward to your pull request

TheNotary commented 10 years ago

I'm doing fine, my dads a bit ill though so I've been doing lots of visiting. I finished the commits for this issue, and just gave it a second look. There was another issue where the * syntax wasn't used, I patched that too hackishly, but upon researching the issue, the [list][*] syntax is the ONLY weird BBCode syntax out there that breaks regex so it makes sense that the code patched in there would feel a little odd.

It might be a nice for this commit to be reviewed and tweaked by someone who's not about to fall asleep though =) Perhaps we should escape 'everything that might interfere with regex parsing' and apply this same escaping to the tags.rb on load of it (grins cleverly).

It's up to you, I'll send all the commits I have in a request to you now and let you decide on things.

veger commented 10 years ago

I hope he recovers soon. I'll try to take a look at the pull request this weekend, as I suppose I'll have some spare time.

TheNotary commented 10 years ago

Sounds good and thanks

veger commented 10 years ago

The part of pull request #15 addressing this issue is merged