Export to GitHub

google-code-prettify - issue #176

lang-lisp: things go wrong with single-quotes ('some)


Posted on Nov 7, 2011 by Quick Hippo

What steps will reproduce the problem?

The following code shows the problem:

<pre class="prettyprint lang-lisp"> (print 'Foo) (print 'Bar) </pre>

What is the expected output?

I expect 'Foo and 'Bar to be green.

What do you see instead?

Only the first 'Foo is green, and the second "print" is green too (which is not right). Obviously, the colorer thinks that something BETWEEN single quotes (i.e. 'Foo (print ' in this case) should be marked as a string literal, while in fact, the S-expression that FOLLOWS a single quote should be marked so.

What version are you using? On what browser?

I am using the version from trunk on Google Chrome.

Please provide any additional information below.

Full HTML code attached.

Attachments

Comment #1

Posted on Mar 30, 2012 by Quick Dog

Add

<script src='http://google-code-prettify.googlecode.com/svn/trunk/src/lang-lisp.js' type='text/javascript'></script>

after the that loads prettify.js to register the lisp language handler, and it should work.

Comment #2

Posted on Jun 29, 2012 by Happy Lion

lang-lisp.js doesn't appear to fix this issue.

Status: Invalid