tylerlong / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

prettifier does not recognize <br> as newline #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. <pre class="prettyprint">//comment<br />int main(int argc, char **argv)
{}</pre>
2.
3.
(Please include HTML, not just your source code)

What is the expected output?  What do you see instead?

I expect prettifier only deals with "//commnet" as comment, and the others
as C source code.  But all of them are regarded as comment.
(Google blogger produces such HTML code...)

What version are you using?  On what browser?

Please provide any additional information below.
Quick fix on prettify.js attached.

Original issue reported on code.google.com by Issei.Su...@gmail.com on 10 May 2007 at 1:59

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by mikesamuel@gmail.com on 15 Aug 2007 at 6:22

GoogleCodeExporter commented 9 years ago

Original comment by mikesamuel@gmail.com on 15 Aug 2007 at 8:43

GoogleCodeExporter commented 9 years ago
I can say that the same goes for html/xml comments. Both <br> and <br /<
tags.

Small sample tested in firefox 2.x is attached.

Regards
Jacob von Eyben
http://ancientprogramming.blogspot.com

Original comment by jacobvon...@gmail.com on 28 Aug 2007 at 4:58

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed both issues -- <br>s not being treated as lexically significant, and 
comments
not being stripped during chunking.

I also fixed a vaguely related bug that caused tags to be stripped by the pass 
that
identifies and recurses into script tags.

See
http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html#is
sue14a
and
http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html#is
sue14b

I will put out a release with these fixes soon.

Original comment by mikesamuel@gmail.com on 30 Aug 2007 at 9:26