jarrett / rbbcode

Converts BBCode to HTML. Gracefully handles invalid input. Built on Treetop.
41 stars 9 forks source link

Code tag terminating on next line #4

Closed fatalerrorx closed 14 years ago

fatalerrorx commented 14 years ago

I have code tags that are terminating before the end code tag is reached it simple put the first line in between code tags.

fatalerrorx commented 14 years ago

need to put code in DEFAULT_BLOCK_LEVEL_ELEMENTS

fatalerrorx commented 14 years ago

still doesn't solve the problem though

jarrett commented 14 years ago

Could you comment on this ticket with sample input and output? Please see README for details.

fatalerrorx commented 14 years ago

Hi jarret sorry i didn't test properly but to solve the problem you need to put code in DEFAULT_BLOCK_LEVEL_ELEMENTS and it works fine now.

jarrett commented 14 years ago

Thank you for the bug report. Could you please provide the code that triggered the bug? Without that, I can't write a test, which means I can't apply a patch.

fatalerrorx commented 14 years ago

Sorry I can't reproduce it in a test. It must have something to do with internationalization on my site but the above mentioned code change fixes it. If i knew how to reproduce it in tests i would.

jarrett commented 14 years ago

Ok. Feel free to patch your own copy, but I'm afraid I can't incorporate the change you've suggested without an example of the bug it's supposed to fix.

I do have some comments on the RSpec example you submitted.

I disagree with the assertions in your first example. <code> is an inline element. Automatically closing the paragraph when a <code> tag is found would be wrong.

However, your second example does identify a bug which seems to be unrelated to your other comments. I will begin work on fixing it. Thanks for finding it!

fatalerrorx commented 14 years ago

Thanks for looking into it I patched my local copy and I'm happy with that if I'm able to reproduce it i'll let you know.

fatalerrorx commented 14 years ago

Well done whatever you did with that new bug has fixed my problem :)

jarrett commented 14 years ago

I take it you're referring to version 0.1.7. I fixed the bug you uncovered in your second example, and I set <code> tags to be wrapped in <pre> tags.

Thanks again for the bug report!