lxzliuxinzhu / syntaxhighlighter

Automatically exported from code.google.com/p/syntaxhighlighter
GNU General Public License v3.0
0 stars 0 forks source link

BloggerMode with Blogs adding adding <br> instead of replaceing \n with <br> #34

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use a Blogging software like Apache Roller
2. Write a article with sourcecode, which is a multi-line source code
3. Enable BloggerMode within the SyntaxHighlighter

What is the expected output? What do you see instead?
I'd expect a clear result with no extra newlines and no <br> tags within
the sourcecode

What version of the product are you using? On what operating system?
1.51

Please provide any additional information below.
As it seems, blogger does replace \n with the <br /> tags. Differnt other
applications add an additional <br /> and leave the \n untouched.

This results in the behavior, that the highlighted code has the <br /> tags
removed properly but has an extra newline after every line of code.

A possible fix I could think of would be to add a configuration option the
BloggerMode method which sets a toggle whether its <br /> only or <br />\n
and changes the behavior of the FixForBlogger Method.

Right now, for my own Blog I just altered the shCore.js file and removed
changed the '\n' to '' within the FixForBlogger method, which works fine
for me.

Original issue reported on code.google.com by philipp....@gmail.com on 26 Sep 2007 at 2:44

GoogleCodeExporter commented 8 years ago
It's my question. Can you give the detail steps of modification with shCore.js?

Original comment by Bruce.E....@gmail.com on 11 Jul 2008 at 9:44

GoogleCodeExporter commented 8 years ago
Or please give me the shCore.js you modified for Blogger about <br/> issue.

Original comment by Bruce.E....@gmail.com on 11 Jul 2008 at 10:00

GoogleCodeExporter commented 8 years ago
I had solve the problem. I shuold add the line:
dp.SyntaxHighlighter.BloggerMode();

Thanks.

Original comment by Bruce.E....@gmail.com on 11 Jul 2008 at 2:12

GoogleCodeExporter commented 8 years ago
[http://www.alem.gen.tr chat] [http://www.sohbetozel.org chat] 
[http://www.mirc1.org 
mirc] [http://www.eniyipartner.com partner] [http://www.sohbetozel.org sohbet] 

Original comment by cresim...@gmail.com on 30 Sep 2008 at 12:08