gimli 0.4.2 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/style.css +24 -0
- data/ext/github_markup.rb +11 -0
- data/lib/gimli.rb +2 -0
- data/lib/gimli/version.rb +1 -1
- data/spec/fixtures/autolink_url.md +1 -1
- data/spec/fixtures/integration/markdown.md +13 -1
- data/spec/fixtures/table.md +7 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e6f46821173f34b23550b56b614e9a8785948e1
|
4
|
+
data.tar.gz: b05911f8a3335aeb7870830ecfeef77754b24d16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c3e80eed0ea02774e7badaf4ce2dfffb53dc18a92206f12ef032d00903556b10203c38daf1b78bf9a57c0eac0a9fd8e4ac32b41d5e4b4650531daf077d87024
|
7
|
+
data.tar.gz: f3da56c4140655361420bc3a7b641a2dca57f12cd80d1028c3e16781120966377b4648240297f85f1c4098550b3ca54d5f6b86f61515c259dde8d59da4693a71
|
data/config/style.css
CHANGED
@@ -147,4 +147,28 @@ ol.CodeRay li { white-space: pre }
|
|
147
147
|
white-space: pre-wrap;
|
148
148
|
word-break: break-all;
|
149
149
|
word-wrap: break-word;
|
150
|
+
}
|
151
|
+
|
152
|
+
table {
|
153
|
+
width: 100%;
|
154
|
+
overflow: auto;
|
155
|
+
display: block;
|
156
|
+
}
|
157
|
+
|
158
|
+
table th {
|
159
|
+
font-weight: bold;
|
160
|
+
}
|
161
|
+
|
162
|
+
table th, table td {
|
163
|
+
border: 1px solid #ddd;
|
164
|
+
padding: 6px 13px;
|
165
|
+
}
|
166
|
+
|
167
|
+
table tr {
|
168
|
+
border-top: 1px solid #ccc;
|
169
|
+
background-color: #fff;
|
170
|
+
}
|
171
|
+
|
172
|
+
table tr:nth-child(2n) {
|
173
|
+
background-color: #f8f8f8;
|
150
174
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Monkey patch github markup to use redcarpet with support for autolinks and tables
|
2
|
+
module GitHub::Markup
|
3
|
+
alias_method :old_render, :render
|
4
|
+
def render(filename, content = nil)
|
5
|
+
if Regexp.compile("\\.(md|mkdn?|mdwn|mdown|markdown|litcoffee)$") =~ filename
|
6
|
+
Redcarpet::Markdown.new(Redcarpet::Render::HTML, :autolink => true, :tables => true).render(content)
|
7
|
+
else
|
8
|
+
old_render(filename, content)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/lib/gimli.rb
CHANGED
data/lib/gimli/version.rb
CHANGED
@@ -45,4 +45,16 @@
|
|
45
45
|
|
46
46
|
**Lorem** ipsum __dolor__ sit *amet*, _consectetur_ adipiscing elit. Phasellus aliquet hendrerit velit eu bibendum. Phasellus et metus at velit vulputate posuere ac a turpis. Vivamus lobortis lectus at augue pretium vel dictum enim mollis. Fusce quis urna eget urna porta vulputate. Mauris eget sapien quis orci auctor adipiscing ac vitae magna. Nulla mauris quam, convallis porta tincidunt quis, imperdiet vitae magna. Maecenas orci odio, ullamcorper et ullamcorper nec, commodo ut lacus. Morbi tortor nulla, facilisis id laoreet non, imperdiet scelerisque sapien. Cras posuere arcu mauris. Nullam ac arcu tellus, a pharetra tellus. Nulla ac odio felis, nec porttitor nisi. Mauris fringilla adipiscing urna, vel ullamcorper felis congue et. Sed sollicitudin tempor odio, vel dignissim diam facilisis et. Nam rhoncus lacinia commodo.
|
47
47
|
|
48
|
-
[Google]: http://google.com/
|
48
|
+
[Google]: http://google.com/
|
49
|
+
|
50
|
+
## Autolink
|
51
|
+
|
52
|
+
https://github.com
|
53
|
+
|
54
|
+
## Table
|
55
|
+
|
56
|
+
| Tables | Are | Cool |
|
57
|
+
| ------------- |:-------------:| -----:|
|
58
|
+
| col 3 is | right-aligned | $1600 |
|
59
|
+
| col 2 is | centered | $12 |
|
60
|
+
| zebra stripes | are neat | $1 |
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gimli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fredrik Wallgren
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-markup
|
@@ -175,6 +175,7 @@ extra_rdoc_files:
|
|
175
175
|
- LICENSE
|
176
176
|
files:
|
177
177
|
- bin/gimli
|
178
|
+
- ext/github_markup.rb
|
178
179
|
- lib/gimli/config.rb
|
179
180
|
- lib/gimli/converter.rb
|
180
181
|
- lib/gimli/markup/code.rb
|
@@ -198,6 +199,7 @@ files:
|
|
198
199
|
- spec/fixtures/long_code_block.md
|
199
200
|
- spec/fixtures/recursion/level1.textile
|
200
201
|
- spec/fixtures/recursion/level2/level2.markdown
|
202
|
+
- spec/fixtures/table.md
|
201
203
|
- spec/fixtures/yaml_front_matter.textile
|
202
204
|
- spec/gimli/converter_spec.rb
|
203
205
|
- spec/gimli/markup/code_block_spec.rb
|