sunshengfei / google-code-prettify

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

Conflicts with Prototype library #59

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Copy the HTML and Javascripts included in the attached file to some folder.
2. Open the index.html file in your browser.

What is the expected output?  What do you see instead?
Expected: The Prototype library lets you hide/show the text at the top, and
the code below is correctly prettified.

Result: The code mangled with Javascript garbage, not showing what it is
supposed to do.

If you comment the line 
<script src="prototype.js" type="text/javascript"></script>
then prettifier works all right.

Now, if you move that line before
<script src="prettify.js" type="text/javascript"></script>
(so that the broswer loads prettifier first), then prettify works fine, but
prototype won't work!

What version are you using?  On what browser?

Prettify-small-14-Jul-2008, prototype 1.6.0.3, Firefox 2, Ubuntu 7.10

Please provide any additional information below.

The bug seems to happen only with the minified small version.
I've included screenshots of what I get just in case you can't reproduce
the bug.

Prototype url: http://www.prototypejs.org/

Original issue reported on code.google.com by andmej@gmail.com on 8 Dec 2008 at 8:01

Attachments:

GoogleCodeExporter commented 8 years ago
I meant of you move the line 
<script src="prototype.js" type="text/javascript"></script>

before line
<script src="prettify.js" type="text/javascript"></script>

then prototype won't work.

Original comment by andmej@gmail.com on 8 Dec 2008 at 8:03

GoogleCodeExporter commented 8 years ago
I put out a bad minified version.  This is a dupe of 53 which I will fix.

Original comment by mikesamuel@gmail.com on 6 Jan 2009 at 10:56