In upgrading from drupal 4.6 to 4.7 I noticed that all code blocks use <pre> now instead of <code>

Looks like this is because the newline processing puts the pre with class="bb-code-block" in place when restoring [code] blocks.. so the later processing that checks for a newline in the code block is never used. I changed the newline processing to simply put $pre[$i] back in place and the later processing then worked as before (alternatively, I guess move the check for a newline in the [code] block into the newline processing... or if the single line [code] isn't desired anymore, remove the later processing code)

CommentFileSizeAuthor
#2 bbcode-filter.inc_patch.txt3.72 KBmindless

Comments

naudefj’s picture

Good point. Would you be able to prepare a patch to move the check for a newline in [code] to the newline processing section?

mindless’s picture

Status: Active » Needs review
StatusFileSize
new3.72 KB

How about this..

naudefj’s picture

It looks good - I will test it later today and provide feedback.

naudefj’s picture

Assigned: Unassigned » naudefj
Status: Needs review » Fixed

Your patch was committed - http://drupal.org/cvs?commit=34812

Thank you very much!

Anonymous’s picture

Status: Fixed » Closed (fixed)