documentation-editor 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/documentation_editor/parser.rb +3 -3
- data/lib/documentation_editor/version.rb +1 -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: 9adeb1522ebc20f98a5bf3337866c999ed221292
|
4
|
+
data.tar.gz: 709c5a01bbf17f910067b724470918197d5dc862
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 438bcd626da3448ecc2a92a9e5a2025d3c9704c6eb2ddc8487256dd666b69e235fa010c2a392e2c33e699212525b416e4dd2a9b2f2616af3538070d92ccba09c
|
7
|
+
data.tar.gz: c12da7e3dc4076d1ad433c913fe102e826f128a8fd849561fc99f1daf3fe5dd49c7d4a1e13a4c6ccfe12f08f068aae53d1887cff167bd6d90318d131affdb28c
|
@@ -22,14 +22,14 @@ class Kramdown::Parser::BlockKramdown < Kramdown::Parser::Kramdown
|
|
22
22
|
matchall_codes = content['codes'].select { |code| code['language'].end_with?("|*") }
|
23
23
|
if code || matchall_codes.size == 1
|
24
24
|
code ||= matchall_codes.first
|
25
|
-
@tree.children << Element.new(:html_element, 'pre')
|
25
|
+
@tree.children << Element.new(:html_element, 'pre', { class: 'highlight' })
|
26
26
|
@tree.children.last.children << Element.new(:raw, code ? highlight(code['language'].split('|').first, code['code']) : "FIXME")
|
27
27
|
else
|
28
28
|
append_code_tabs matchall_codes
|
29
29
|
end
|
30
30
|
elsif content['codes'].size == 1
|
31
31
|
code = content['codes'].first
|
32
|
-
@tree.children << Element.new(:html_element, 'pre')
|
32
|
+
@tree.children << Element.new(:html_element, 'pre', { class: 'highlight' })
|
33
33
|
@tree.children.last.children << Element.new(:raw, highlight(code['language'].split('|').first, code['code']))
|
34
34
|
else
|
35
35
|
append_code_tabs(content['codes'])
|
@@ -154,7 +154,7 @@ class Kramdown::Parser::BlockKramdown < Kramdown::Parser::Kramdown
|
|
154
154
|
ul.children << Element.new(:html_element, 'li', { class: ('active' if i == 0) })
|
155
155
|
ul.children.last.children << Element.new(:html_element, 'a', { href: "##{id}", 'data-toggle' => 'tab' })
|
156
156
|
ul.children.last.children.last.children << Element.new(:raw, label)
|
157
|
-
tab_content.children << Element.new(:html_element, 'pre', { class: "tab-pane#{' in active' if i == 0}", id: id })
|
157
|
+
tab_content.children << Element.new(:html_element, 'pre', { class: "highlight tab-pane#{' in active' if i == 0}", id: id })
|
158
158
|
tab_content.children.last.children << Element.new(:raw, highlight(language, v['code']))
|
159
159
|
end
|
160
160
|
@tree.children << ul
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: documentation-editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Algolia Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|