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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ec6cf05f16e1ba01985a055b16a82f7f7b0bb3a4
4
- data.tar.gz: f8327b6e502ed74ab7941b348dcf4c7ce21de1db
3
+ metadata.gz: 5e6f46821173f34b23550b56b614e9a8785948e1
4
+ data.tar.gz: b05911f8a3335aeb7870830ecfeef77754b24d16
5
5
  SHA512:
6
- metadata.gz: d58dc6ceebdad26c7faf90722d85fd657d12470fb76b7a59776d2c10abe57633b027e37721f2639bf9aecafbaab1b5afabdf1776fabdde0c5cfb1c1a74a43a08
7
- data.tar.gz: 52c4dd99977f842999903b9aa19432704a0ad8471da9092dfa71c5347657da7e664434e0a87b67b9ecc53cb92721ffd453bcacb93930430ff61d755d04a29458
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
@@ -8,6 +8,8 @@ require 'gimli/converter'
8
8
  require 'gimli/path'
9
9
  require 'gimli/wkhtmltopdf'
10
10
 
11
+ require File.expand_path(File.dirname(__FILE__)) + '/../ext/github_markup.rb'
12
+
11
13
  module Gimli
12
14
 
13
15
  # Create a config object
data/lib/gimli/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Gimli
4
- VERSION = "0.4.2"
4
+ VERSION = "0.5.2"
5
5
  end
6
6
 
@@ -1,3 +1,3 @@
1
1
  # Autolink url
2
2
 
3
- Autolink this <https://github.com> url.
3
+ Autolink this https://github.com url.
@@ -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 |
@@ -0,0 +1,7 @@
1
+ # Table
2
+
3
+ | Tables | Are | Cool |
4
+ | ------------- |:-------------:| -----:|
5
+ | col 3 is | right-aligned | $1600 |
6
+ | col 2 is | centered | $12 |
7
+ | 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.2
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-21 00:00:00.000000000 Z
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