Page 1 of 1

Lots of <br />s when using syntax highlight plugins.

Posted: Wed Jul 11, 2007 6:22 pm
by anakin
I have setup a Serendipity blog on my gentoo server yesterday and intended to record some of my ideas and codes. After everything seems to be fine, I went to find syntax highlight plugins in order to make articles and source codes easier for reading.

Since now, I have tried Geshi, BBcode, and Serendipity dp.SyntaxHighlighter Plugin written by Brendon Kozlowski, but all of them have the html symbol <br /> included at the end of line. I even disabled WYSIWYG editor, but the problem remained.

Can anyone please be so kind to tell me what's wrong with my blog? I really appreciated.

Re: Lots of <br />s when using syntax highlight plugin

Posted: Wed Jul 11, 2007 7:02 pm
by garvinhicking
Hii!

Actually what is causing this '<br>' is the "NL2BR" markup plugin by s9y. It converts your linebreaks to br's. So either you completely remove that plugin (or disable it for entries where you post sourcecode, by using the 'Extended properties for entries plugin'), or make sure you place the nl2br plugin AFTER the sourcecode highlighting plugin.

Also you might want to remove the 's9ymarkup' event plugin since together with Sourcecode postings this might format unwanted things.

HTH,
Garvin

Posted: Sun Jul 15, 2007 10:12 pm
by gizmola
As always Garv is right, however, you can still use the nl2br plugin with the Geshi plugin for example, but the Geshi plugin must come before th nl2br plugin in order. Serendipity calls the plugins in the order in which they appear, and if nl2br operates before Geshi gets it, then it will already have inserted a bunch of br tags into your source.