gibier 0.8.13 → 0.8.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gibier/renderer.rb +6 -2
- data/lib/gibier/slide_loader.rb +1 -1
- data/lib/gibier/version.rb +1 -1
- data/template/project/data/sample/slide.md +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a4d7b82509129dc9e1f98e27e777f1544baa1c0994cb5de54f6e63808178232
|
4
|
+
data.tar.gz: 9a9adec540981104883c0da092c04eb310f9c20247583c5b8d2415b45c71c112
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7f9a0a2d45a0ba7db4ee2e866dce2e573b8973cd1148bf2855a6cefb64ea7e4a621140d81075b3b35b1683590f519b24ca40649d4b2d5691fe35e2d42d6ef9e
|
7
|
+
data.tar.gz: da5f0ca6b8f022ddc5826abf848c73ff72453a61172da2be413f8c524e153607883c20645548f4544a3703de88188b727369e1a373b6fceac2bbaf4d585c3b0a
|
data/lib/gibier/renderer.rb
CHANGED
@@ -8,7 +8,8 @@ class String
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def expand_tag
|
11
|
-
|
11
|
+
str = self.gsub(/<br>\n/, '<br></br>')
|
12
|
+
m = /\A(?<head>.*?)(?<body><(?<tag>\w+)( (?<attrs>{(\w+:.+?)(, \w:.+?)*}))?>(?<inner>.*?)<\/\k<tag>>)(?<tail>.*?)\z/.match(str)
|
12
13
|
if m
|
13
14
|
arr = []
|
14
15
|
arr << m[:head].escape unless m[:head].empty?
|
@@ -57,7 +58,6 @@ module Gibier
|
|
57
58
|
:block_quote,
|
58
59
|
|
59
60
|
# span-level calls
|
60
|
-
:autolink,
|
61
61
|
:underline,
|
62
62
|
:triple_emphasis,
|
63
63
|
:superscript, :highlight,
|
@@ -177,6 +177,10 @@ EOD
|
|
177
177
|
"<a {href:#{link.escape}, target:\"_blank\"}>#{content}</a>"
|
178
178
|
end
|
179
179
|
|
180
|
+
def autolink(url, type)
|
181
|
+
"<a {href:#{url.escape}, target:\"_brank\"}>#{url}</a>"
|
182
|
+
end
|
183
|
+
|
180
184
|
def image(link, title, alt_text)
|
181
185
|
href = "\#{Gibier.assets_path}/images/#{link}"
|
182
186
|
"<p {class:\"#{alt_text}\"}><img {src:#{href.escape}}></img></p>"
|
data/lib/gibier/slide_loader.rb
CHANGED
@@ -33,7 +33,7 @@ module Gibier
|
|
33
33
|
def self.load_slide(name)
|
34
34
|
File.open("#{src_path(name)}/pages.rb", "w+") do |f|
|
35
35
|
data = File.read("data/#{name}/slide.md")
|
36
|
-
markdown = Redcarpet::Markdown.new(Gibier::Renderer.create(name), fenced_code_blocks: true)
|
36
|
+
markdown = Redcarpet::Markdown.new(Gibier::Renderer.create(name), autolink: true, fenced_code_blocks: true)
|
37
37
|
f.write markdown.render(data)
|
38
38
|
end
|
39
39
|
|
data/lib/gibier/version.rb
CHANGED
@@ -46,6 +46,18 @@ render as shown on the next page
|
|
46
46
|
|
47
47
|
default font
|
48
48
|
|
49
|
+
## Link
|
50
|
+
|
51
|
+
```
|
52
|
+
* [Link](http://youchan.org/gibier/sample/)
|
53
|
+
* http://youchan.org/gibier/sample/
|
54
|
+
```
|
55
|
+
|
56
|
+
## Link
|
57
|
+
|
58
|
+
* [Link](http://youchan.org/gibier/sample/)
|
59
|
+
* http://youchan.org/gibier/sample/
|
60
|
+
|
49
61
|
## Image
|
50
62
|
|
51
63
|
```
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gibier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- youchan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|