snaptoken 0.21.0 → 0.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/snaptoken/commands/doc.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a81cb9783bd03718bb76147934e37db517b9e1f6
|
4
|
+
data.tar.gz: 6ec69608e410ab0c0ec3aaf728140b8dccdf0d90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dc3fdf69e5dba4127d71dbb357da64bd7de0846b6f810075effab046d9d6ebb9fd6ade61989f774a7d81462a97f37f8ca6614f25a253d19af63966c61ae8b9d
|
7
|
+
data.tar.gz: f7678326bb314641b8e2bb8bb0f830061f45702c0ddd1b84d8beb6440dee138d0b614757d8c3713e865c169dcb3dfec0ccec57bdebe570aa7d98fd7a163a4a7f
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "rouge/plugins/redcarpet"
|
2
|
+
|
1
3
|
class Snaptoken::Commands::Doc < Snaptoken::Commands::BaseCommand
|
2
4
|
def self.name
|
3
5
|
"doc"
|
@@ -23,6 +25,10 @@ class Snaptoken::Commands::Doc < Snaptoken::Commands::BaseCommand
|
|
23
25
|
end
|
24
26
|
end
|
25
27
|
|
28
|
+
class HTMLRouge < Redcarpet::Render::HTML
|
29
|
+
include Rouge::Plugins::Redcarpet
|
30
|
+
end
|
31
|
+
|
26
32
|
private
|
27
33
|
|
28
34
|
def copy_static_files
|
@@ -88,7 +94,8 @@ class Snaptoken::Commands::Doc < Snaptoken::Commands::BaseCommand
|
|
88
94
|
html_template = File.read("html_in/template.html")
|
89
95
|
|
90
96
|
index = ""
|
91
|
-
|
97
|
+
html_renderer = HTMLRouge.new(with_toc_data: true)
|
98
|
+
markdown = Redcarpet::Markdown.new(html_renderer, fenced_code_blocks: true)
|
92
99
|
pages = Dir["*.md"].sort.map { |f| f.sub(/\.md$/, '') }
|
93
100
|
pages.delete "00.index"
|
94
101
|
pages.each.with_index do |page, idx|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snaptoken
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.22.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Ruten
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|