File: code-pygments.html

package info (click to toggle)
ruby-org 0.9.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,852 kB
  • sloc: ruby: 3,044; lisp: 50; makefile: 4
file content (37 lines) | stat: -rw-r--r-- 1,450 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<h1>Simple Code Syntax highlighting test</h1>
<div class="highlight"><pre><span class="k">class</span> <span class="nc">Pygments</span>
  <span class="k">class</span> <span class="o">&lt;&lt;</span> <span class="nb">self</span>
    <span class="k">def</span> <span class="nf">colorize</span>
      <span class="c1"># Do colorizing stuff here</span>
      <span class="n">heredoc</span> <span class="o">=</span> <span class="o">&lt;&lt;</span><span class="no">EOF</span>
<span class="sh">    Some text yay!!!</span>
<span class="no">EOF</span>
    <span class="k">end</span>
  <span class="k">end</span>
<span class="k">end</span>
</pre></div>
<p>Now using EXAMPLE blocks instead:</p>
<pre class="example">
def hello()
  puts &quot;hello&quot;
end
</pre>
<p>Small case should work as well:</p>
<pre class="example">
class Hello
  def say
    puts &quot;hola&quot;
  end
end
</pre>
<div class="highlight"><pre><span class="k">class</span> <span class="nc">Piano</span>
  <span class="k">def</span> <span class="nf">play_note</span><span class="p">(</span><span class="n">note</span><span class="p">)</span>
  <span class="c1"># TODO</span>
  <span class="k">end</span>
<span class="k">end</span>
</pre></div>
<h1>When including a file as an src code file</h1>
<div class="highlight"><pre>- This file has only a list
- Note it will end with nothing other than a list item.
- the world wants to know: Will org-ruby write the closing ul tag?
</pre></div>