cheatset 1.1.6 → 1.1.7
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.
- checksums.yaml +4 -4
- data/lib/cheatset/creator.rb +5 -6
- data/lib/cheatset/dsl/base.rb +2 -1
- data/lib/cheatset/templates/style.css +12 -4
- data/lib/cheatset/templates/style.scss +12 -3
- data/lib/cheatset/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7a8a3bdf0350f61845f4c05bc1e456bcf6669a0
|
|
4
|
+
data.tar.gz: 1dacd3db352eadfa32ef8858e43b71c1fe383d72
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88c5787a096f0ddb4495b76e8f32699d4ab9ea0a1b063ec1c7aedfecb483519b4f00eeabd2b1755ee10497f7114a62b1fc797cb458ca49779532ab6683c17561
|
|
7
|
+
data.tar.gz: a2418aba029b0ec177f0199b5f7b075039745716b88bbefe3abd5bdd010f5fcf86f8b061846c06eb116411226ab8cf6d6666065fde8fb4a8bb2870e5c5527be1
|
data/lib/cheatset/creator.rb
CHANGED
|
@@ -44,16 +44,15 @@ class Cheatset::Creator
|
|
|
44
44
|
|
|
45
45
|
def generate_plist_file
|
|
46
46
|
plist_data = {
|
|
47
|
-
'CFBundleIdentifier' =>
|
|
47
|
+
'CFBundleIdentifier' => 'cheatsheet',
|
|
48
48
|
'CFBundleName' => @cheatsheet.title,
|
|
49
|
-
'DocSetPlatformFamily' =>
|
|
49
|
+
'DocSetPlatformFamily' => 'cheatsheet',
|
|
50
50
|
'DashDocSetFamily' => 'cheatsheet',
|
|
51
51
|
'isDashDocset' => true,
|
|
52
|
-
'dashIndexFilePath' => 'index.html'
|
|
52
|
+
'dashIndexFilePath' => 'index.html',
|
|
53
|
+
'DashDocSetPluginKeyword' => (@cheatsheet.platform) ? @cheatsheet.platform : @cheatsheet.keyword,
|
|
54
|
+
'DashDocSetKeyword' => @cheatsheet.keyword
|
|
53
55
|
}
|
|
54
|
-
if @cheatsheet.platform
|
|
55
|
-
plist_data['DocSetDashPluginKeyword'] = @cheatsheet.platform
|
|
56
|
-
end
|
|
57
56
|
File.open("#{@path}Info.plist", 'w') do |file|
|
|
58
57
|
file.write(Plist::Emit.dump(plist_data))
|
|
59
58
|
end
|
data/lib/cheatset/dsl/base.rb
CHANGED
|
@@ -3,6 +3,7 @@ require 'rouge'
|
|
|
3
3
|
require 'rouge/plugins/redcarpet'
|
|
4
4
|
require 'sanitize'
|
|
5
5
|
require 'unindent'
|
|
6
|
+
require 'cgi'
|
|
6
7
|
|
|
7
8
|
class HTML < Redcarpet::Render::HTML
|
|
8
9
|
include Rouge::Plugins::Redcarpet
|
|
@@ -55,7 +56,7 @@ module Cheatset
|
|
|
55
56
|
instance_variable_get("@#{name}")
|
|
56
57
|
end
|
|
57
58
|
define_method("tags_stripped_#{name}") do
|
|
58
|
-
Sanitize.clean(send(name))
|
|
59
|
+
CGI.unescapeHTML(Sanitize.clean(send(name)))
|
|
59
60
|
end
|
|
60
61
|
end
|
|
61
62
|
end
|
|
@@ -73,13 +73,13 @@ table {
|
|
|
73
73
|
width: 100%; }
|
|
74
74
|
|
|
75
75
|
td {
|
|
76
|
-
padding:
|
|
76
|
+
padding: 13px 2px 0px 8px; }
|
|
77
77
|
|
|
78
78
|
td.command {
|
|
79
79
|
width: 1%;
|
|
80
80
|
white-space: nowrap;
|
|
81
81
|
vertical-align: top;
|
|
82
|
-
padding:
|
|
82
|
+
padding: 9px 8px 4px 7px;
|
|
83
83
|
text-align: right; }
|
|
84
84
|
td.command code {
|
|
85
85
|
padding: .1em .6em;
|
|
@@ -99,7 +99,7 @@ a {
|
|
|
99
99
|
color: #666666; }
|
|
100
100
|
|
|
101
101
|
p {
|
|
102
|
-
margin: 0 0
|
|
102
|
+
margin: 0 0 7px; }
|
|
103
103
|
|
|
104
104
|
.highlight {
|
|
105
105
|
background-color: #f8f8f8;
|
|
@@ -315,4 +315,12 @@ p {
|
|
|
315
315
|
|
|
316
316
|
pre {
|
|
317
317
|
padding: 15px;
|
|
318
|
-
line-height: 17px;
|
|
318
|
+
line-height: 17px;
|
|
319
|
+
margin-top: 0px;
|
|
320
|
+
margin-bottom: 9px; }
|
|
321
|
+
|
|
322
|
+
.name {
|
|
323
|
+
margin-top: -4px; }
|
|
324
|
+
|
|
325
|
+
ul {
|
|
326
|
+
padding-left: 24px; }
|
|
@@ -91,13 +91,13 @@ table {
|
|
|
91
91
|
width: 100%;
|
|
92
92
|
}
|
|
93
93
|
td {
|
|
94
|
-
padding:
|
|
94
|
+
padding: 13px 2px 0px 8px;
|
|
95
95
|
}
|
|
96
96
|
td.command {
|
|
97
97
|
width: 1%;
|
|
98
98
|
white-space: nowrap;
|
|
99
99
|
vertical-align: top;
|
|
100
|
-
padding:
|
|
100
|
+
padding: 9px 8px 4px 7px;
|
|
101
101
|
text-align:right;
|
|
102
102
|
code {
|
|
103
103
|
// Nice key styling:
|
|
@@ -125,7 +125,7 @@ a {
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
p {
|
|
128
|
-
margin:0 0
|
|
128
|
+
margin:0 0 7px;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
.highlight { background-color: #f8f8f8; border: 1px solid #ccc; padding: 6px 10px; border-radius: 3px; margin-right:15px; white-space: pre-wrap; word-wrap:break-word;}
|
|
@@ -195,5 +195,14 @@ p {
|
|
|
195
195
|
pre {
|
|
196
196
|
padding: 15px;
|
|
197
197
|
line-height: 17px;
|
|
198
|
+
margin-top: 0px;
|
|
199
|
+
margin-bottom: 9px;
|
|
198
200
|
}
|
|
199
201
|
|
|
202
|
+
.name {
|
|
203
|
+
margin-top: -4px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
ul {
|
|
207
|
+
padding-left: 24px;
|
|
208
|
+
}
|
data/lib/cheatset/version.rb
CHANGED