doddoreul / google-code-prettify

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

HTML not showing #55

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add <link href="prettify.css" type="text/css" rel="stylesheet" />
       <script type="text/javascript" src="prettify.js"></script>
       <body onload="prettyPrint()">
2. Paste between <pre class="prettyprint"> and <pre> a html source code.

(Please include HTML, not just your source code)

What is the expected output?  What do you see instead?
I was expecting the source code nicely highlighted. I got the page :| In
this example, a blank line.

What version are you using?  On what browser?
I'm using the latest version, on the lastest firefox/IE

Original issue reported on code.google.com by adrian.n...@gmail.com on 2 Nov 2008 at 7:48

Attachments:

GoogleCodeExporter commented 8 years ago
What do you mean you added the page?

If you did like this:
<pre class="prettyprint">
<html>
  <head>
    <title>Hello HTML</title>
  </head>
  <body>
    <p>Hello World!</p>
  </body>
</html>
<pre>

it's wrong. You need to have text content in that pre element, which means that 
you
are not allowed to use the specials characters < > & " but < > & "

Original comment by ovidiu.mara on 14 Nov 2008 at 10:11

GoogleCodeExporter commented 8 years ago
Ovidiu is quite right.  You can use the XMP element if you don't want to escape 
your
HTML code.

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