Project

General

Profile

FAQ » History » Version 6

Version 5 (Kornelius Kalnbach, 02/10/2010 01:54 AM) → Version 6/10 (Kornelius Kalnbach, 02/10/2010 02:01 AM)

h1. FAQ

{{toc}}

h2. Documentation

* "Official documentation":http://coderay.rubychan.de/doc/
* "Tutorial":http://coderay.rubychan.de/doc/classes/CodeRay.html

Both are somewhat historic, and "will be cleaned up":http://redmine.rubychan.de/issues/show/74 some day!

h2. The HTML output doesn't have colors!

If you use the @HTML@ encoder, you need a CodeRay stylesheet. Try running:

@coderay_stylesheet > coderay.css@

or use the @Div@ (inline styles) or @Page@ (standalone HTML page) encoders.

h2. I Want A <language> Scanner!

Read about [[ScannerRequests]].

h2. CodeRay throws Exceptions at me when $DEBUG is set!

It will be adressed in the next release (#192). For now, wrap your CodeRay calls with:

<pre><code class="ruby">
debug = $DEBUG
$DEBUG = false
CodeRay.do(:something)
$DEBUG = debug
</code></pre>

h2. The JSON scanner doesn't allow comments!

That's because you use invalid "JSON":http://json.org. It doesn't allow comments, unquoted keys or strings, the value @undefined@, shebang lines, or embedded walruses. CodeRay highlights all these as "errors":http://coderay.rubychan.de/rays/show/6333.

You can either abandon invalid JSON, or "use the JavaScript scanner":http://coderay.rubychan.de/rays/show/6334.

Also read
Read an elaborate answer about the [[Picky JSON Scanner]].