Closed TheNotary closed 12 years ago
Thanks for reporting this issue.
Yes, it should work. I'll take a look at it soon.
I am able to reproduce the problem: it is due to the line breaks in your example. I am working on a fix.
I fixed your problem, I think. Could you let me know whether I understood your problem correctly and indeed fixed it?
Just tested it out, that's a pretty good fix. You might also consider making it remove the
unless there are consequtive spaces. IE
[ul] [li]First Element[/li] [li]Second Element[/li] [li]Third Element[/li] [/ul]
Would convert to the same output as
[ul][li]First Element[/li][li]Second Element[/li][li]Third Element[/li][/ul]
Yet
[ul] [li]First Element[/li]
[li]Second Element[/li]
[li]Third Element[/li] [/ul]
Would convert to something with those
tags in it. That's just a though though. Either way this is a good fix and I'm glad it worked out. Thanks for your work on the gem =)
I was planning to keep the whitespace characters in, as the person that types the BB code intended it (or not... but still typed it). Automatically removing whitespace might 'upset' these persons. (I think) But feel free to fork the project and to modify it for your own purposes
So these inputs won't parse well
[ul] [li]First Element[/li] [li]Second Element[/li] [li]Third Element[/li] [/ul]
And I think it should. The [ul] complains that it can't have
elements in it. Is this easy to fix?