Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Regen docs.
  • Loading branch information
rgrove committed Jul 29, 2011
1 parent c79c631 commit 4665758
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 57 deletions.
8 changes: 4 additions & 4 deletions docs/html/assets/css/main.css
Expand Up @@ -91,7 +91,7 @@ h5, h6 { font-size: 107.692%; }

/* -- Code and examples ----------------------------------------------------- */
code, kbd, pre, samp {
font-family: Menlo, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Consolas', 'Monaco', fixed;
font-family: Menlo, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Consolas', 'Inconsolata', 'Monaco', 'Courier New', fixed;
font-size: 92.308%;
line-height: 1.35;
}
Expand All @@ -112,19 +112,19 @@ table code, table kbd, table samp,
padding: 0;
}

pre.code, pre.terminal {
#doc pre.code, #doc pre.terminal {
overflow-x: auto;
*overflow-x: scroll;
padding: 0.3em 0.6em;
}

pre.code {
#doc pre.code {
background: #f8f8f8;
border: 1px solid #ececec;
border-left: 5px solid #e2e2e2;
}

pre.terminal {
#doc pre.terminal {
background: #F0EFFC;
border: 1px solid #D0CBFB;
border-left: 5px solid #D0CBFB;
Expand Down
29 changes: 27 additions & 2 deletions docs/html/assets/vendor/prettify/CHANGES.html
Expand Up @@ -24,7 +24,7 @@ <h1>Change Log</h1>
<h2>29 March 2007</h2>
<ul>
<li>Added <a href="tests/prettify_test.html#PHP">tests</a> for PHP support
to address
to address
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=3"
>issue 3</a>.
<li>Fixed
Expand All @@ -43,7 +43,7 @@ <h2>29 March 2007</h2>
<li>Fixed entity handling so that the caveat
<blockquote>
<p>Caveats: please properly escape less-thans. <tt>x&amp;lt;y</tt>
instead of <tt>x&lt;y</tt>, and use <tt>&quot;</tt> instead of
instead of <tt>x&lt;y</tt>, and use <tt>&quot;</tt> instead of
<tt>&amp;quot;</tt> for string delimiters.</p>
</blockquote>
is no longer applicable.
Expand Down Expand Up @@ -126,5 +126,30 @@ <h2>19 July 2010</h2>
<a href="http://code.google.com/p/google-code-prettify/issues/detail?id=108"
>108</a>.</li>
</ul>
<h2>7 September 2010</h2>
<ul>
<li>Added support for coffeescript courtesy Cezary Bartoszuk.</li>
</ul>
<h2>4 March 2011</h2>
<ul>
<li>Added a <a href="http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html">themes
gallery</a> to showcase contributed styles.</li>
<li>Added support for XQuery courtesy Patrick Wied, Nemerle
courtesy Zimin A.V., and Latex support courtesy Martin S.</li>
</ul>
<h2>29 March 2011</h2>
<ul>
<li>Fixed IE newline issues, and copying/pasting of prettified
source code from IE. This required significant internal changes
but involves no API changes.
<b>Caveat:</b> <code>prettyPrintOne</code> injects the HTML
passed to it into a <code>&lt;pre&gt;</code> element.
If the HTML comes from a trusted source, this may allow XSS.
Do not do this. This should not be a problem for existing apps
since the standard usage is to rewrite the HTML and then inject
it, so anyone doing that with untrusted HTML already has an XSS
vulnerability. If you sanitize and prettify HTML from an
untrusted source, sanitize first.
</ul>
</body>
</html>
56 changes: 43 additions & 13 deletions docs/html/assets/vendor/prettify/README.html
Expand Up @@ -26,9 +26,9 @@ <h2>Setup</h2>
(you will need to make sure the css and js file are on your server, and
adjust the paths in the <tt>script</tt> and <tt>link</tt> tag)
<pre class="prettyprint">
&lt;link href="prettify.css" type="text/css" rel="stylesheet" />
&lt;script type="text/javascript" src="prettify.js">&lt;/script></pre>
<li>Add <code class="prettyprint lang-html">onload="prettyPrint()"</code> to your
&lt;link href="prettify.css" type="text/css" rel="stylesheet" /&gt;
&lt;script type="text/javascript" src="prettify.js"&gt;&lt;/script&gt;</pre>
<li>Add <code class="prettyprint lang-in.tag">onload="prettyPrint()"</code> to your
document's body tag.
<li>Modify the stylesheet to get the coloring you prefer</li>
</ol>
Expand Down Expand Up @@ -63,7 +63,7 @@ <h2>Usage</h2>
</table>

<h2>FAQ</h2>
<h3 id="langs">Which languages does it work for?</h3>
<h3 id="langs">For which languages does it work?</h3>
<p>The comments in <tt>prettify.js</tt> are authoritative but the lexer
should work on a number of languages including C and friends,
Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles.
Expand All @@ -75,29 +75,45 @@ <h3 id="langs">Which languages does it work for?</h3>
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js"
><code>lang-lisp.js</code></a>.</p>
<p>And similarly for
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-clj.js"
><code>Clojure</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css.js"
><code>CSS</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-go.js"
><code>Go</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs.js"
><code>Haskell</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js"
><code>Lua</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js"
><code>OCAML, SML, F#</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js"
><code>Visual Basic</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-n.js"
><code>Nemerle</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js"
><code>Protocol Buffers</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-scala.js"
><code>Scala</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js"
><code>SQL</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js"
><code>Protocol Buffers</code></a>, and
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tex.js"
><code>TeX, LaTeX</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vhdl.js"
><code>VHDL</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js"
><code>Visual Basic</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js"
><code>WikiText</code></a>..
><code>WikiText</code></a>,
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-xq.js"
><code>XQuery</code></a>, and
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-yaml.js"
><code>YAML</code></a>.

<p>If you'd like to add an extension for your favorite language, please
look at <tt>src/lang-lisp.js</tt> and file an
<a href="http://code.google.com/p/google-code-prettify/issues/list"
>issue</a> including your language extension, and a testcase.</p>

<h3>How do I specify which language my code is in?</h3>
<h3>How do I specify the language of my code?</h3>
<p>You don't need to specify the language since <code>prettyprint()</code>
will guess. You can specify a language by specifying the language extension
along with the <code>prettyprint</code> class like so:</p>
Expand All @@ -110,6 +126,12 @@ <h3>How do I specify which language my code is in?</h3>
"xhtml", "xml", "xsl".
&lt;/pre&gt;</pre>

<p>You may also use the
<a href="http://dev.w3.org/html5/spec-author-view/the-code-element.html#the-code-element"
>HTML 5</a> convention of embedding a <tt>code</tt> element inside the
<code>PRE</code> and using <code>language-java</code> style classes.
E.g. <xmp class="prettyprint"><pre class="prettyprint"><code class="language-java">...</code></pre></xmp>

<h3>It doesn't work on <tt>&lt;obfuscated code sample&gt;</tt>?</h3>
<p>Yes. Prettifying obfuscated code is like putting lipstick on a pig
&mdash; i.e. outside the scope of this tool.</p>
Expand Down Expand Up @@ -191,13 +213,21 @@ <h3>I get an error message "a is not a function" or "opt_whenDone is not a funct
so that the browser does not pass an event object to <code>prettyPrint</code> which
will confuse it.

<h3>How can I customize the colors and styles of my code?</h3>
<p>
Prettify adds <code>&lt;span&gt;</code> with <code>class</code>es describing
the kind of code. You can create CSS styles to matches these
classes.
See the
<a href="http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html">
theme gallery</a> for examples.
</p>

<br><br><br>

<div class="footer">
<!-- Created: Tue Oct 3 17:51:56 PDT 2006 -->
<!-- hhmts start -->
Last modified: Wed Jul 19 13:56:00 PST 2010
<!-- hhmts end -->
<!-- hhmts start -->Last modified: Fri May 27 20:23:23 PDT 2011 <!-- hhmts end -->
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion docs/html/assets/vendor/prettify/prettify-min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4665758

Please sign in to comment.