We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bbdf75 commit 727617fCopy full SHA for 727617f
articles/.gitignore
@@ -9,8 +9,3 @@
9
*.epub
10
11
*.css
12
-!epub.css
13
-
14
-# switch by grunt task
15
-review-ext.rb
16
-layouts/layout.html.erb
articles/review-ext.rb
@@ -0,0 +1,19 @@
1
+# encoding: utf-8
2
+
3
+module ReVIEW
4
+ class HTMLBuilder
5
+ def list_body(id, lines, lang)
6
+ id ||= ''
7
+ classNames = ["list"]
8
+ lang ||= File.extname(id).gsub(/\./, '')
+ if lang != ''
+ classNames.push("language-#{lang}")
+ end
+ print %Q[<pre class="#{classNames.join(" ")}">]
+ body = lines.inject(''){|i, j| i + detab(j) + "\n"}
+ lexer = lang || File.extname(id).gsub(/\./, '')
+ puts highlight(:body => body, :lexer => lexer, :format => 'html')
+ puts '</pre>'
17
18
19
+end
0 commit comments