user guide updates for code sections
This commit is contained in:
1 parent
c7fb88db82
commit
0d2fe02b9c
3 files changed
+96
-67
No files matched your search
@@ -5,6 +5,9 @@
|
||||
body {
|
||||
max-width: 140ex;
|
||||
}
|
||||
.code {
|
||||
padding-left: 2ex;
|
||||
}
|
||||
.ruby_code .normal {}
|
||||
.ruby_code .comment { color: #005; font-style: italic; }
|
||||
.ruby_code .keyword { color: #A00; font-weight: bold; }
|
||||
|
||||
@@ -63,9 +63,9 @@ class Generator
|
||||
end
|
||||
if syntax != ""
|
||||
convertor = Syntax::Convertors::HTML.for_syntax(syntax)
|
||||
%[<div class="#{syntax}_code">\n#{convertor.convert(code)}\n</div>\n]
|
||||
%[<div class="code #{syntax}_code">\n#{convertor.convert(code)}\n</div>\n]
|
||||
else
|
||||
%[<div class="code">\n#{code}\n</div>\n]
|
||||
%[<div class="code">\n<pre>#{code}</pre>\n</div>\n]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user