Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit af02d25

Browse files
updated list of language extensions
1 parent 2c1a0e0 commit af02d25

File tree

2 files changed

+39
-45
lines changed

2 files changed

+39
-45
lines changed

README.html

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<style type="text/css">
1313
body { margin-left: .5in }
1414
h1, h2, h3, h4, .footer { margin-left: -.4in; }
15+
a.Extension { display: inline-block; width: 5em; height:2.5em; border: 1px solid black; vertical-align: top; text-align: center }
1516
</style>
1617
</head>
1718

@@ -66,49 +67,42 @@ <h2>FAQ</h2>
6667
<h3 id="langs">For which languages does it work?</h3>
6768
<p>The comments in <tt>prettify.js</tt> are authoritative but the lexer
6869
should work on a number of languages including C and friends,
69-
Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles.
70+
Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, Makefiles,
71+
and Rust.
7072
It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl
71-
and Ruby, but, because of commenting conventions, doesn't work on
72-
Smalltalk, or CAML-like languages.</p>
73-
74-
<p>LISPy languages are supported via an extension:
75-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js"
76-
><code>lang-lisp.js</code></a>.</p>
77-
<p>And similarly for
78-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-clj.js"
79-
><code>Clojure</code></a>,
80-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css.js"
81-
><code>CSS</code></a>,
82-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-go.js"
83-
><code>Erlang</code></a>,
84-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-erlang.js"
85-
><code>Go</code></a>,
86-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs.js"
87-
><code>Haskell</code></a>,
88-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js"
89-
><code>Lua</code></a>,
90-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js"
91-
><code>OCAML, SML, F#</code></a>,
92-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-n.js"
93-
><code>Nemerle</code></a>,
94-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js"
95-
><code>Protocol Buffers</code></a>,
96-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-scala.js"
97-
><code>Scala</code></a>,
98-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js"
99-
><code>SQL</code></a>,
100-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tex.js"
101-
><code>TeX, LaTeX</code></a>,
102-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vhdl.js"
103-
><code>VHDL</code></a>,
104-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js"
105-
><code>Visual Basic</code></a>,
106-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js"
107-
><code>WikiText</code></a>,
108-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-xq.js"
109-
><code>XQuery</code></a>, and
110-
<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-yaml.js"
111-
><code>YAML</code></a>.
73+
and Ruby, but, because of commenting conventions, but doesn't work on
74+
Smalltalk.</p>
75+
76+
<p>Other languages are supported via extensions:
77+
<div>
78+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-apollo.js">Apollo</a>
79+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-basic.js">Basic</a>
80+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-clj.js">Clojure</a>
81+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css.js">CSS</a>
82+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-dart.js">Dart</a>
83+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-erlang.js">Erlang</a>
84+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-go.js">Go</a>
85+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs.js">Haskell</a>
86+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js">Lisp, Scheme</a>
87+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-llvm.js">Llvm</a>
88+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js">Lua</a>
89+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js">OCAML, SML, F#</a>
90+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-mumps.js">Mumps</a>
91+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-n.js">Nemerle</a>
92+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-pascal.js">Pascal</a>
93+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js">Protocol buffers</a>
94+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-r.js">R, S</a>
95+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-rd.js">RD</a>
96+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-scala.js">Scala</a>
97+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js">SQL</a>
98+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tcl.js">TCL</a>
99+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tex.js">Latek</a>
100+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js">Basic, VB</a>
101+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vhdl.js">CHDL</a>
102+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js">Wiki</a>
103+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-xq.js">XQ</a>
104+
<a class="Extension" href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-yaml.js">Yaml</a>
105+
</div>
112106

113107
<p>If you'd like to add an extension for your favorite language, please
114108
look at <tt>src/lang-lisp.js</tt> and file an
@@ -229,7 +223,7 @@ <h3>How can I customize the colors and styles of my code?</h3>
229223

230224
<div class="footer">
231225
<!-- Created: Tue Oct 3 17:51:56 PDT 2006 -->
232-
<!-- hhmts start -->Last modified: Fri May 27 20:23:23 PDT 2011 <!-- hhmts end -->
226+
<!-- hhmts start -->Last modified: Fri Feb 22 18:02:14 EST 2013 <!-- hhmts end -->
233227
</div>
234228
</body>
235229
</html>

examples/quine.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>Making Quines Prettier</title>
66
<!-- The defer is not necessary for autoloading, but is necessary for the
77
script at the bottom to work as a Quine. -->
8-
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?autoload=true&skin=sunburst&lang=css" defer="defer"></script>
8+
<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?autoload=true&amp;skin=sunburst&amp;lang=css" defer="defer"></script>
99
<style>.operative { font-weight: bold; border:1px solid yellow }</style>
1010
</head>
1111

@@ -40,7 +40,7 @@ <h1>Making Quines Prettier</h1>
4040

4141
var quineHtml = html(
4242
'<!DOCTYPE html>\n<html>\n'
43-
+ document.documentElement.innerHTML
43+
+ document.documentElement.innerHTML
4444
+ '\n<\/html>\n');
4545

4646
// Highlight the operative parts:

0 commit comments

Comments
 (0)