glyph 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/book/config.yml +1 -1
- data/book/document.glyph +5 -5
- data/book/lib/layouts/bookindex.glyph +4 -27
- data/book/lib/layouts/bookpage.glyph +5 -28
- data/book/lib/macros/reference.rb +4 -12
- data/book/text/changelog.glyph +10 -2
- data/book/text/compiling/compiling.glyph +0 -1
- data/book/text/extending/interpreting.glyph +1 -1
- data/book/text/introduction.glyph +21 -29
- data/book/text/license.glyph +1 -1
- data/book/text/macros/macros_core.glyph +0 -3
- data/book/text/ref_commands.glyph +32 -24
- data/book/text/stats/stats.glyph +1 -1
- data/book/text/text_editing/code.glyph +2 -2
- data/book/text/text_editing/evaluation.glyph +6 -6
- data/book/text/text_editing/inclusions.glyph +2 -2
- data/book/text/text_editing/links.glyph +3 -3
- data/config.yml +8 -1
- data/glyph-0.5.1.gem +0 -0
- data/glyph.gemspec +7 -7
- data/lib/glyph.rb +2 -2
- data/lib/glyph/commands.rb +9 -16
- data/lib/glyph/commands/add.rb +1 -1
- data/lib/glyph/commands/compile.rb +1 -1
- data/lib/glyph/commands/config.rb +1 -1
- data/lib/glyph/commands/init.rb +1 -1
- data/lib/glyph/commands/outline.rb +1 -1
- data/lib/glyph/commands/stats.rb +1 -1
- data/lib/glyph/commands/todo.rb +1 -1
- data/lib/glyph/utils.rb +200 -175
- data/macros/block.rb +2 -2
- data/macros/reps/html.rb +4 -3
- data/macros/reps/html5.rb +4 -3
- data/macros/structure.rb +1 -0
- data/spec/config.yml +3 -3
- data/spec/lib/commands_spec.rb +15 -28
- data/spec/macros/core_spec.rb +4 -4
- data/spec/macros/filters_spec.rb +3 -3
- data/spec/macros/html5_spec.rb +3 -3
- data/spec/macros/macros_spec.rb +28 -3
- data/spec/macros/textile_spec.rb +2 -2
- data/spec/macros/web5_spec.rb +4 -4
- data/spec/macros/web_spec.rb +4 -4
- data/spec/spec_helper.rb +12 -1
- data/spec/tasks/generate_spec.rb +1 -1
- data/styles/coderay.css +9 -7
- data/styles/coderay.scss +7 -7
- data/styles/default.css +60 -43
- data/styles/default.scss +68 -40
- data/styles/definitions.scss +1 -1
- data/styles/pagination.css +16 -13
- data/styles/pagination.scss +18 -18
- data/tasks/generate.rake +3 -3
- data/tasks/load.rake +1 -4
- metadata +98 -47
data/macros/block.rb
CHANGED
@@ -92,7 +92,7 @@ macro :navigation do
|
|
92
92
|
# Get the previous topic
|
93
93
|
previous_topic = @node[:document].topics.last
|
94
94
|
if previous_topic then
|
95
|
-
@data[:previous] = render :link, :target => "#{base_url}#{previous_topic[:src].gsub(/\..+$/, '.html')}", :title => previous_topic[:title]
|
95
|
+
@data[:previous] = render :link, :target => "#{base_url}#{previous_topic[:src].gsub(/\..+$/, '.html')}", :title => "← "+previous_topic[:title]
|
96
96
|
else
|
97
97
|
@data[:previous] = ""
|
98
98
|
end
|
@@ -100,7 +100,7 @@ macro :navigation do
|
|
100
100
|
@data[:next] = placeholder do |document|
|
101
101
|
current_topic = document.topics.select{|t| t[:id] == topic_id}[0] rescue nil
|
102
102
|
next_topic = document.topics[document.topics.index(current_topic)+1] rescue nil
|
103
|
-
render :link, :title => next_topic[:title], :target => "#{base_url}#{next_topic[:src].gsub(/\..+$/, '.html')}" if next_topic
|
103
|
+
render :link, :title => next_topic[:title]+" →", :target => "#{base_url}#{next_topic[:src].gsub(/\..+$/, '.html')}" if next_topic
|
104
104
|
end
|
105
105
|
render
|
106
106
|
end
|
data/macros/reps/html.rb
CHANGED
@@ -171,9 +171,10 @@ rep :toc_sublist do |data|
|
|
171
171
|
end
|
172
172
|
|
173
173
|
rep :section do |data|
|
174
|
-
|
175
|
-
|
176
|
-
%{<
|
174
|
+
sec_class = data[:name].to_s.match(/[a-z0-9_-]/i) ? data[:name] : "section"
|
175
|
+
hd_class = data[:toc] ? "toc" : "notoc"
|
176
|
+
title = data[:title] ? %{<h#{data[:level]} id="#{data[:id]}" class="#{hd_class}">#{data[:title]}</h#{data[:level]}>\n} : ""
|
177
|
+
%{<div class="#{sec_class}">
|
177
178
|
#{title}#{data[:content]}
|
178
179
|
|
179
180
|
</div>}
|
data/macros/reps/html5.rb
CHANGED
@@ -91,9 +91,10 @@ rep :toc do |data|
|
|
91
91
|
end
|
92
92
|
|
93
93
|
rep :section do |data|
|
94
|
-
|
95
|
-
|
96
|
-
%{<
|
94
|
+
sec_class = data[:name].to_s.match(/[a-z0-9_-]/i) ? data[:name] : "section"
|
95
|
+
hd_class = data[:toc] ? "toc" : "notoc"
|
96
|
+
title = data[:title] ? %{<header><h1 id="#{data[:id]}" class="#{hd_class}">#{data[:title]}</h1></header>\n} : ""
|
97
|
+
%{<section class="#{sec_class}">
|
97
98
|
#{title}#{data[:content]}
|
98
99
|
|
99
100
|
</section>}
|
data/macros/structure.rb
CHANGED
data/spec/config.yml
CHANGED
data/spec/lib/commands_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
3
|
|
4
|
+
|
4
5
|
require File.join(File.dirname(__FILE__), "..", "spec_helper")
|
5
|
-
require 'glyph/commands'
|
6
6
|
|
7
7
|
describe "glyph" do
|
8
8
|
|
@@ -14,11 +14,6 @@ describe "glyph" do
|
|
14
14
|
reset_quiet
|
15
15
|
delete_project
|
16
16
|
end
|
17
|
-
|
18
|
-
it "[-v] should pront the program name and version and quit" do
|
19
|
-
run_command(["-v"]).should == "Glyph v#{Glyph::VERSION}\n\n"
|
20
|
-
run_command(["-v", "compile"]).should == "Glyph v#{Glyph::VERSION}\n\n"
|
21
|
-
end
|
22
17
|
|
23
18
|
it "[init] should create a project in the current directory" do
|
24
19
|
delete_project
|
@@ -35,7 +30,7 @@ describe "glyph" do
|
|
35
30
|
|
36
31
|
it "[config] should write configuration settings" do
|
37
32
|
create_project
|
38
|
-
run_command_successfully(["config", "test_setting", true]).should == true
|
33
|
+
run_command_successfully(["config", "test_setting", "true"]).should == true
|
39
34
|
Glyph::CONFIG.get(:test_setting).should == true
|
40
35
|
Glyph::PROJECT_CONFIG.read
|
41
36
|
Glyph::PROJECT_CONFIG.get('test_setting').should == true
|
@@ -54,7 +49,7 @@ describe "glyph" do
|
|
54
49
|
it "[config] should not overwrite system settings" do
|
55
50
|
create_project
|
56
51
|
Glyph['system.test_setting'] = false
|
57
|
-
run_command(["config", "system.test_setting", true]).match(/warning.+\(system use only\)/m).should_not == nil
|
52
|
+
run_command(["config", "system.test_setting", "true"]).match(/warning.+\(system use only\)/m).should_not == nil
|
58
53
|
Glyph['system.test_setting'].should == false
|
59
54
|
end
|
60
55
|
|
@@ -147,27 +142,23 @@ describe "glyph" do
|
|
147
142
|
file_copy "#{Glyph::PROJECT}/../files/ligature.jpg", "#{Glyph::PROJECT}/ligature.jpg"
|
148
143
|
run_command_successfully(["compile", "article.glyph"]).should == true
|
149
144
|
Pathname.new('article.html').exist?.should == true
|
150
|
-
file_load('article.html')
|
145
|
+
compact_html(file_load('article.html')).should == compact_html(%{
|
146
|
+
<?xml version="1.0"?>
|
151
147
|
<div class="section">
|
152
|
-
|
148
|
+
改善 Test -- Test Snippet
|
153
149
|
</div>
|
154
|
-
}
|
150
|
+
})
|
155
151
|
(Glyph::PROJECT/'article.html').unlink
|
156
152
|
Glyph['document.output'] = 'pdf'
|
157
153
|
src = Glyph::PROJECT/'article.html'
|
158
154
|
out = Glyph::PROJECT/'article.pdf'
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
out.exist?.should == true
|
167
|
-
out.unlink
|
168
|
-
end
|
169
|
-
generate_pdf.call 'prince'
|
170
|
-
generate_pdf.call 'wkhtmltopdf'
|
155
|
+
Glyph.enable 'generate:html'
|
156
|
+
Glyph.enable 'generate:pdf'
|
157
|
+
Glyph.enable 'generate:pdf_through_html'
|
158
|
+
run_command_successfully(["compile", "article.glyph"]).should == true
|
159
|
+
src.exist?.should == true
|
160
|
+
out.exist?.should == true
|
161
|
+
out.unlink
|
171
162
|
Glyph.lite_mode = false
|
172
163
|
end
|
173
164
|
|
@@ -189,11 +180,7 @@ describe "glyph" do
|
|
189
180
|
err = "Document cannot be finalized due to previous errors"
|
190
181
|
res = run_command(["compile"])
|
191
182
|
out = file_load Glyph::PROJECT/'output/html/test_project.html'
|
192
|
-
out.should == %{
|
193
|
-
<h2 id="h_1">Test</h2>
|
194
|
-
|
195
|
-
|
196
|
-
</div>}
|
183
|
+
compact_html(out).should == %{<?xml version="1.0"?><div class="section"><h2 id="h_1" class="toc">Test</h2></div>}
|
197
184
|
res.match("error: #{err}").should == nil
|
198
185
|
end
|
199
186
|
|
data/spec/macros/core_spec.rb
CHANGED
@@ -84,10 +84,10 @@ describe "Macro:" do
|
|
84
84
|
interpret text
|
85
85
|
@p.document.output.gsub(/\n|\t/, '').should == %{
|
86
86
|
<div class="section">
|
87
|
-
<h2 id="h_1">Container section</h2>
|
87
|
+
<h2 id="h_1" class="toc">Container section</h2>
|
88
88
|
This is a test.
|
89
89
|
<div class="section">
|
90
|
-
<h3 id="h_2">Test Section</h3>
|
90
|
+
<h3 id="h_2" class="toc">Test Section</h3>
|
91
91
|
<p>…</p>
|
92
92
|
</div>
|
93
93
|
</div>
|
@@ -97,10 +97,10 @@ describe "Macro:" do
|
|
97
97
|
it "include should work in Lite mode" do
|
98
98
|
Glyph.lite_mode = true
|
99
99
|
result = %{<div class="section">
|
100
|
-
<h2 id="h_1">Container section</h2>
|
100
|
+
<h2 id="h_1" class="toc">Container section</h2>
|
101
101
|
This is a test.
|
102
102
|
<div class="section">
|
103
|
-
<h3 id="h_2">Test Section</h3>
|
103
|
+
<h3 id="h_2" class="toc">Test Section</h3>
|
104
104
|
<p>…</p>
|
105
105
|
</div>
|
106
106
|
|
data/spec/macros/filters_spec.rb
CHANGED
@@ -55,10 +55,10 @@ interpret text
|
|
55
55
|
code = %{def test_method(a, b)
|
56
56
|
puts a+b
|
57
57
|
end}
|
58
|
-
cr_result = %{<div class=\"CodeRay\"> <div class=\"code\"><pre><span class=\"line-numbers\"><a href=\"#n1\" name=\"n1\">1</a></span><span class=\"keyword\">def</span> <span class=\"function\">test_method</span>(a, b) <span class=\"line-numbers\"><a href=\"#n2\" name=\"n2\">2</a></span> puts a+b <span class=\"line-numbers\"><a href=\"#n3\" name=\"n3\">3</a></span> <span class=\"keyword\">end</span
|
58
|
+
cr_result = %{<div class=\"CodeRay\"> <div class=\"code\"><pre><span class=\"line-numbers\"><a href=\"#n1\" name=\"n1\">1</a></span><span class=\"keyword\">def</span> <span class=\"function\">test_method</span>(a, b) <span class=\"line-numbers\"><a href=\"#n2\" name=\"n2\">2</a></span> puts a+b <span class=\"line-numbers\"><a href=\"#n3\" name=\"n3\">3</a></span> <span class=\"keyword\">end</span></pre></div> </div>}
|
59
59
|
uv_result = %{<pre class=\"iplastic\"><span class=\"Keyword\">def</span>
|
60
60
|
<span class=\"FunctionName\">test_method</span>(<span class=\"Arguments\">a<span class=\"Arguments\">,</span> b</span>)
|
61
|
-
puts a<span class=\"Keyword\">+</span>b <span class=\"Keyword\">end</span
|
61
|
+
puts a<span class=\"Keyword\">+</span>b <span class=\"Keyword\">end</span></pre>}
|
62
62
|
Glyph['filters.ultraviolet.theme'] = 'iplastic'
|
63
63
|
check = lambda do |hl, result|
|
64
64
|
Glyph["filters.highlighter"] = hl.to_sym
|
@@ -74,7 +74,7 @@ interpret text
|
|
74
74
|
it "textile_section, markdown_section" do
|
75
75
|
output_for("§txt[*test*]").should == "<div class=\"section\">\n<p><strong>test</strong></p>\n\n</div>"
|
76
76
|
output_for("§md[*test*]").should == "<div class=\"section\">\n<p><em>test</em></p>\n\n</div>"
|
77
|
-
output_for("textile_section[@title[test]...]").should == "<div class=\"section\">\n<h2 id=\"h_1\">test</h2>\n<p>…</p>\n\n</div>"
|
77
|
+
output_for("textile_section[@title[test]...]").should == "<div class=\"section\">\n<h2 id=\"h_1\" class=\"toc\">test</h2>\n<p>…</p>\n\n</div>"
|
78
78
|
end
|
79
79
|
|
80
80
|
|
data/spec/macros/html5_spec.rb
CHANGED
@@ -21,11 +21,11 @@ describe "Macro:" do
|
|
21
21
|
interpret text
|
22
22
|
doc = @p.document
|
23
23
|
doc.output.gsub(/\n|\t/, '').should == %{<section class="chapter">
|
24
|
-
<header><h1 id="h_1">Chapter X</h1></header>...
|
24
|
+
<header><h1 id="h_1" class="toc">Chapter X</h1></header>...
|
25
25
|
<section class="section">
|
26
|
-
<header><h1 id="sec-y">Section Y</h1></header>...
|
26
|
+
<header><h1 id="sec-y" class="toc">Section Y</h1></header>...
|
27
27
|
<section class="section">
|
28
|
-
<header><h1 id="h_3">Another section</h1></header>...
|
28
|
+
<header><h1 id="h_3" class="toc">Another section</h1></header>...
|
29
29
|
</section>
|
30
30
|
</section>
|
31
31
|
</section>
|
data/spec/macros/macros_spec.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
2
3
|
require File.join(File.dirname(__FILE__), "..", "spec_helper")
|
3
4
|
|
4
5
|
describe "Macro:" do
|
@@ -27,11 +28,11 @@ describe "Macro:" do
|
|
27
28
|
interpret text
|
28
29
|
doc = @p.document
|
29
30
|
doc.output.gsub(/\n|\t/, '').should == %{<div class="chapter">
|
30
|
-
<h2 id="h_1">Chapter X</h2>...
|
31
|
+
<h2 id="h_1" class="toc">Chapter X</h2>...
|
31
32
|
<div class="section">
|
32
|
-
<h3 id="sec-y">Section Y</h3>...
|
33
|
+
<h3 id="sec-y" class="toc">Section Y</h3>...
|
33
34
|
<div class="section">
|
34
|
-
<h4 id="h_3">Another section</h4>...
|
35
|
+
<h4 id="h_3" class="toc">Another section</h4>...
|
35
36
|
</div>
|
36
37
|
</div>
|
37
38
|
</div>
|
@@ -188,4 +189,28 @@ describe "Macro:" do
|
|
188
189
|
Glyph['document.draft'] = false
|
189
190
|
end
|
190
191
|
|
192
|
+
it "Aliased section titles should be at the same level of non-aliased section titles" do
|
193
|
+
normal = %{
|
194
|
+
section[
|
195
|
+
@title[Title2]
|
196
|
+
...
|
197
|
+
]
|
198
|
+
}
|
199
|
+
aliased = %{
|
200
|
+
§[
|
201
|
+
@title[Title2]
|
202
|
+
...
|
203
|
+
]
|
204
|
+
}
|
205
|
+
container = lambda do |s|
|
206
|
+
%{
|
207
|
+
section[
|
208
|
+
@title[Title]
|
209
|
+
#{s}
|
210
|
+
]
|
211
|
+
}
|
212
|
+
end
|
213
|
+
output_for(container.call aliased).should == output_for(container.call normal)
|
214
|
+
end
|
215
|
+
|
191
216
|
end
|
data/spec/macros/textile_spec.rb
CHANGED
@@ -44,7 +44,7 @@ Testing:
|
|
44
44
|
]]}
|
45
45
|
result =
|
46
46
|
%{<div class="section">
|
47
|
-
<h2 id="h_1">Test</h2>
|
47
|
+
<h2 id="h_1" class="toc">Test</h2>
|
48
48
|
#@html
|
49
49
|
</div>}
|
50
50
|
filter(text1).should == result
|
@@ -108,7 +108,7 @@ Testing:
|
|
108
108
|
</div>}
|
109
109
|
result =
|
110
110
|
%{<div class="section">
|
111
|
-
<h2 id="h_1">Test</h2>
|
111
|
+
<h2 id="h_1" class="toc">Test</h2>
|
112
112
|
#@html
|
113
113
|
<div class="code">
|
114
114
|
<pre>
|
data/spec/macros/web5_spec.rb
CHANGED
@@ -24,9 +24,9 @@ describe "Macro:" do
|
|
24
24
|
|
25
25
|
it "navigation" do
|
26
26
|
Glyph.run! 'generate:web5'
|
27
|
-
web1 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/web1.html')
|
28
|
-
web2 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/b/web2.html')
|
29
|
-
web1.match(%{<nav
|
30
|
-
web2.match(%{<nav><a href="/a/web1.html">Topic #1</a
|
27
|
+
web1 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/web1.html').gsub(/\n|\t| /, '')
|
28
|
+
web2 = Glyph.file_load(Glyph::PROJECT/'output/web5/a/b/web2.html').gsub(/\n|\t| /, '')
|
29
|
+
web1.should match(%{<nav>|<a href="/index.html">Contents</a>|<a href="/a/b/web2.html">→ Topic #2</a></nav>})
|
30
|
+
web2.should match(%{<nav><a href="/a/web1.html">Topic #1</a>|<a href="/index.html">Contents</a>|</nav>})
|
31
31
|
end
|
32
32
|
end
|
data/spec/macros/web_spec.rb
CHANGED
@@ -31,8 +31,8 @@ describe "Macro:" do
|
|
31
31
|
|
32
32
|
it "navigation" do
|
33
33
|
Glyph.run! 'generate:web'
|
34
|
-
web1 = Glyph.file_load(Glyph::PROJECT/'output/web/a/web1.html')
|
35
|
-
web2 = Glyph.file_load(Glyph::PROJECT/'output/web/a/b/web2.html')
|
34
|
+
web1 = compact_html Glyph.file_load(Glyph::PROJECT/'output/web/a/web1.html')
|
35
|
+
web2 = compact_html Glyph.file_load(Glyph::PROJECT/'output/web/a/b/web2.html')
|
36
36
|
web1.match(%{<div class="navigation"> | <a href="/index.html">Contents</a> | <a href="/a/b/web2.html">Topic #2</a></div>}).blank?.should == false
|
37
37
|
web2.match(%{<div class="navigation"><a href="/a/web1.html">Topic #1</a> | <a href="/index.html">Contents</a> | </div>}).blank?.should == false
|
38
38
|
end
|
@@ -44,13 +44,13 @@ describe "Macro:" do
|
|
44
44
|
index.match(%{href="/a/web1.html#h_3"}).blank?.should == false
|
45
45
|
index.match(%{href="/a/b/web2.html#h_7"}).blank?.should == false
|
46
46
|
web1 = Glyph.file_load(Glyph::PROJECT/'output/web/a/web1.html')
|
47
|
-
web1.should match(/<h2 id="t_0">Topic #1<\/h2>/) # Headers are reset in each topic
|
47
|
+
web1.should match(/<h2 id="t_0" class="toc">Topic #1<\/h2>/) # Headers are reset in each topic
|
48
48
|
delete_project
|
49
49
|
reset_quiet
|
50
50
|
create_web_project
|
51
51
|
Glyph['document.output'] = 'html'
|
52
52
|
Glyph.run! 'generate:html'
|
53
|
-
index = Glyph.file_load(Glyph::PROJECT/'output/html/test_project.html')
|
53
|
+
index = compact_html Glyph.file_load(Glyph::PROJECT/'output/html/test_project.html')
|
54
54
|
index.should match(%{<li class="section"><a href="#h_3">Topic #1</a></li><li><ol><li class="section"><a href="#h_4">Test #1a</a></li>})
|
55
55
|
index.match(%{href="a/web1.html#h_3"}).blank?.should == true
|
56
56
|
index.match(%{href="a/b/web2.html#h_7"}).blank?.should == true
|
data/spec/spec_helper.rb
CHANGED
@@ -13,6 +13,8 @@ rescue
|
|
13
13
|
end
|
14
14
|
|
15
15
|
require "glyph"
|
16
|
+
require "glyph/commands"
|
17
|
+
|
16
18
|
|
17
19
|
Glyph['system.quiet'] = true
|
18
20
|
|
@@ -71,7 +73,7 @@ end
|
|
71
73
|
def run_command(cmd, return_code=false)
|
72
74
|
result = 0
|
73
75
|
out = stdout_for do
|
74
|
-
result =
|
76
|
+
result = TOPLEVEL_BINDING.eval('self').run cmd
|
75
77
|
end
|
76
78
|
return_code ? result : out
|
77
79
|
end
|
@@ -166,3 +168,12 @@ def macro_node(name, options={})
|
|
166
168
|
:escape => false
|
167
169
|
}.merge options)
|
168
170
|
end
|
171
|
+
|
172
|
+
|
173
|
+
def compact_html(html)
|
174
|
+
html.tap do |h|
|
175
|
+
h.gsub! /\n|\t/, ''
|
176
|
+
h.gsub! /\s{2,}/, ''
|
177
|
+
h.gsub! /\>\s*\</, '><'
|
178
|
+
end
|
179
|
+
end
|
data/spec/tasks/generate_spec.rb
CHANGED
@@ -104,7 +104,7 @@ describe "generate" do
|
|
104
104
|
# check that index.html is created
|
105
105
|
index = (Glyph::PROJECT/'output/web/index.html')
|
106
106
|
index.exist?.should == true
|
107
|
-
file_load(index).should match(/<li class="section"><a href="\/test\/a\/b\/web2.html#h_7">Topic #2<\/a>/)
|
107
|
+
compact_html(file_load(index)).should match(/<li class="section"><a href="\/test\/a\/b\/web2.html#h_7">Topic #2<\/a>/)
|
108
108
|
# check that topics are copied in the proper directories
|
109
109
|
web1 = (Glyph::PROJECT/'output/web/a/web1.html')
|
110
110
|
web1.exist?.should == true
|
data/styles/coderay.css
CHANGED
@@ -3,12 +3,13 @@
|
|
3
3
|
*/
|
4
4
|
.CodeRay {
|
5
5
|
background-color: #FFF;
|
6
|
-
border: 1px solid #
|
6
|
+
border: 1px solid #ECECEC;
|
7
7
|
line-height: 1.3em;
|
8
8
|
font-size: 12px;
|
9
|
-
font-family: Monospace;
|
9
|
+
font-family: 'Inconsolata', Monospace;
|
10
10
|
color: #000;
|
11
|
-
padding:
|
11
|
+
padding: 10px;
|
12
|
+
margin: 1em 0; }
|
12
13
|
|
13
14
|
.CodeRay pre, .CodeRay code {
|
14
15
|
padding: 0;
|
@@ -32,11 +33,10 @@ table.CodeRay td {
|
|
32
33
|
vertical-align: top; }
|
33
34
|
|
34
35
|
.CodeRay .line-numbers, .CodeRay .no {
|
35
|
-
|
36
|
-
margin: 0 inherit;
|
36
|
+
margin: 0 2px 0 0;
|
37
37
|
background-color: #ECECEC;
|
38
38
|
color: #AAA;
|
39
|
-
|
39
|
+
width: 20px;
|
40
40
|
text-align: right; }
|
41
41
|
|
42
42
|
.CodeRay .line-numbers tt {
|
@@ -90,7 +90,9 @@ ol.CodeRay li {
|
|
90
90
|
|
91
91
|
.CodeRay .comment {
|
92
92
|
color: #998;
|
93
|
-
font-style: italic;
|
93
|
+
font-style: italic;
|
94
|
+
border: 0;
|
95
|
+
background: transparent; }
|
94
96
|
|
95
97
|
.CodeRay .char {
|
96
98
|
color: #04D; }
|
data/styles/coderay.scss
CHANGED
@@ -4,12 +4,13 @@
|
|
4
4
|
*/
|
5
5
|
.CodeRay {
|
6
6
|
background-color: #FFF;
|
7
|
-
border: 1px solid #
|
7
|
+
border: 1px solid #ECECEC;
|
8
8
|
line-height: 1.3em;
|
9
9
|
font-size: 12px;
|
10
|
-
font-family: Monospace;
|
10
|
+
font-family: 'Inconsolata', Monospace;
|
11
11
|
color: #000;
|
12
|
-
padding:
|
12
|
+
padding: 10px;
|
13
|
+
margin: 1em 0;
|
13
14
|
}
|
14
15
|
.CodeRay pre, .CodeRay code {
|
15
16
|
padding: 0;
|
@@ -29,11 +30,10 @@ table.CodeRay td {
|
|
29
30
|
}
|
30
31
|
|
31
32
|
.CodeRay .line-numbers, .CodeRay .no {
|
32
|
-
|
33
|
-
margin: 0 inherit;
|
33
|
+
margin: 0 2px 0 0;
|
34
34
|
background-color: #ECECEC;
|
35
35
|
color: #AAA;
|
36
|
-
|
36
|
+
width: 20px;
|
37
37
|
text-align: right;
|
38
38
|
}
|
39
39
|
.CodeRay .line-numbers tt { font-weight: bold }
|
@@ -55,7 +55,7 @@ ol.CodeRay li { white-space: pre }
|
|
55
55
|
.CodeRay .attribute-value { color:#700 }
|
56
56
|
.CodeRay .attribute-value-fat { color:#C00 }
|
57
57
|
.CodeRay .binary { color:#509; font-weight:bold }
|
58
|
-
.CodeRay .comment { color:#998; font-style: italic;}
|
58
|
+
.CodeRay .comment { color:#998; font-style: italic; border: 0; background: transparent;}
|
59
59
|
|
60
60
|
.CodeRay .char { color:#04D }
|
61
61
|
.CodeRay .ch .content { color:#04D }
|