My favorites | Sign in
Project Logo
                
Search
for
Updated Aug 05, 2007 by alex.gorbatchev
Labels: Documentation
BloggerMode  
Blogger Mode

Blogger Mode

Blogger has a nasty habit of replacing all new lines with <br/> tags which makes it impossible to post code snippets.

To fix the situation version 1.5.1 introduces "Blogger Mode" which can be enabled before a call to HighlightAll() by a call to BloggerMode() like in the example below:

dp.SyntaxHighlighter.BloggerMode();
dp.SyntaxHighlighter.HighlightAll('code');

Comment by dan82pettersson, May 15, 2008

I had a problem with actually showing the <br /> tag in html code samples on Blogger. Removed this part regular expression in the fixforblogger-function: |&lt;br\s\/?&gt;

Now only the actual <br>-tags will be replaced by /n but not the &lt;-ones that I do want to display in my code samples.

Comment by fahd.shariff, Jul 08, 2008

If you use Blogger in Draft, you won't have this issue. "The new post editor does not introduce <br>s within tables, lists, scripts, styles, preformatted blocks, or objects."

Hosted by Google Code