FAQ » History » Version 6
Kornelius Kalnbach, 02/10/2010 02:01 AM
1 | 1 | Kornelius Kalnbach | h1. FAQ |
---|---|---|---|
2 | 1 | Kornelius Kalnbach | |
3 | 3 | Kornelius Kalnbach | {{toc}} |
4 | 3 | Kornelius Kalnbach | |
5 | 2 | Kornelius Kalnbach | h2. Documentation |
6 | 2 | Kornelius Kalnbach | |
7 | 2 | Kornelius Kalnbach | * "Official documentation":http://coderay.rubychan.de/doc/ |
8 | 2 | Kornelius Kalnbach | * "Tutorial":http://coderay.rubychan.de/doc/classes/CodeRay.html |
9 | 2 | Kornelius Kalnbach | |
10 | 2 | Kornelius Kalnbach | Both are somewhat historic, and "will be cleaned up":http://redmine.rubychan.de/issues/show/74 some day! |
11 | 2 | Kornelius Kalnbach | |
12 | 1 | Kornelius Kalnbach | h2. The HTML output doesn't have colors! |
13 | 1 | Kornelius Kalnbach | |
14 | 1 | Kornelius Kalnbach | If you use the @HTML@ encoder, you need a CodeRay stylesheet. Try running: |
15 | 1 | Kornelius Kalnbach | |
16 | 1 | Kornelius Kalnbach | @coderay_stylesheet > coderay.css@ |
17 | 1 | Kornelius Kalnbach | |
18 | 1 | Kornelius Kalnbach | or use the @Div@ (inline styles) or @Page@ (standalone HTML page) encoders. |
19 | 1 | Kornelius Kalnbach | |
20 | 1 | Kornelius Kalnbach | h2. I Want A <language> Scanner! |
21 | 1 | Kornelius Kalnbach | |
22 | 1 | Kornelius Kalnbach | Read about [[ScannerRequests]]. |
23 | 4 | Kornelius Kalnbach | |
24 | 4 | Kornelius Kalnbach | h2. CodeRay throws Exceptions at me when $DEBUG is set! |
25 | 4 | Kornelius Kalnbach | |
26 | 4 | Kornelius Kalnbach | It will be adressed in the next release (#192). For now, wrap your CodeRay calls with: |
27 | 4 | Kornelius Kalnbach | |
28 | 4 | Kornelius Kalnbach | <pre><code class="ruby"> |
29 | 4 | Kornelius Kalnbach | debug = $DEBUG |
30 | 4 | Kornelius Kalnbach | $DEBUG = false |
31 | 4 | Kornelius Kalnbach | CodeRay.do(:something) |
32 | 4 | Kornelius Kalnbach | $DEBUG = debug |
33 | 4 | Kornelius Kalnbach | </code></pre> |
34 | 5 | Kornelius Kalnbach | |
35 | 5 | Kornelius Kalnbach | h2. The JSON scanner doesn't allow comments! |
36 | 5 | Kornelius Kalnbach | |
37 | 6 | Kornelius Kalnbach | 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. |
38 | 6 | Kornelius Kalnbach | |
39 | 6 | Kornelius Kalnbach | You can either abandon invalid JSON, or "use the JavaScript scanner":http://coderay.rubychan.de/rays/show/6334. |
40 | 6 | Kornelius Kalnbach | |
41 | 6 | Kornelius Kalnbach | Also read an elaborate answer about the [[Picky JSON Scanner]]. |