Page 1 of 1
publishing programming code
Posted: Thu Jan 17, 2008 11:03 am
by toncho11
I want to publish some code on my blog to show it to other people.
I user the "pre" tag, but I get too many new rows. It is because serendipity replaces all new rows in my post with br tag or whatever. How could I disable this for a single post?
10x,
Anton
Re: publishing programming code
Posted: Thu Jan 17, 2008 1:20 pm
by yellowled
toncho11 wrote:I want to publish some code on my blog to show it to other people. I user the "pre" tag, but I get too many new rows. It is because serendipity replaces all new rows in my post with br tag or whatever.
Might be or probably is. You might want to take a look at the Geshi plugin.
YL
Re: publishing programming code
Posted: Thu Jan 17, 2008 2:33 pm
by garvinhicking
Hi!
The nl2br plugin does that. Since serendipity 1.2 you can configure that event plugin to exclude certain html tags, like <pre>, if you want.
Regards,
Garvin
Posted: Thu Jan 17, 2008 7:02 pm
by toncho11
I used the nl2br plugin to remove the <br>s and geshi plugin:
[geshi lang=csharp]
code
[/geshi]
and it worked.