utopia-project 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utopia/project/document.rb +9 -9
- data/lib/utopia/project/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cfe292fc5ad76cafb0765a46f5891f743d5886dec92f744f1fa8f49997d4d8b
|
4
|
+
data.tar.gz: a32f0a530557e4d2f9d53c3d90091e7f57cb2ace727e5fb3a3c40d7390916fd1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b58efae800f38011e36f21bff47b2332dc26e97da422d8e6f2b1542cee37346961318262cc2637e92b05b2613964061b80b82b02f96ec6de676297868bf3810d
|
7
|
+
data.tar.gz: 9324c2e89376fee181e74fc893c9938e45c63b38cdfe683f18776d4e37f76eab83545c3b97b84e5cfcda53f039c9a21f36bc179d7aa7232be499901752761a0a
|
@@ -20,7 +20,7 @@
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
21
|
# THE SOFTWARE.
|
22
22
|
|
23
|
-
require '
|
23
|
+
require 'markly'
|
24
24
|
|
25
25
|
module Utopia
|
26
26
|
module Project
|
@@ -37,7 +37,7 @@ module Utopia
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def root
|
40
|
-
@root ||= resolve(
|
40
|
+
@root ||= resolve(Markly.parse(@text))
|
41
41
|
end
|
42
42
|
|
43
43
|
def first_child
|
@@ -69,35 +69,35 @@ module Utopia
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def to_html(node = self.root)
|
72
|
-
Trenni::MarkupString.raw(node.to_html(:UNSAFE))
|
72
|
+
Trenni::MarkupString.raw(node.to_html(flags: Markly::UNSAFE))
|
73
73
|
end
|
74
74
|
|
75
75
|
def paragraph_node(child)
|
76
|
-
node =
|
76
|
+
node = Markly::Node.new(:paragraph)
|
77
77
|
node.append_child(child)
|
78
78
|
return node
|
79
79
|
end
|
80
80
|
|
81
81
|
def html_node(content, type = :html)
|
82
|
-
node =
|
82
|
+
node = Markly::Node.new(:html)
|
83
83
|
node.string_content = content
|
84
84
|
return node
|
85
85
|
end
|
86
86
|
|
87
87
|
def inline_html_node(content)
|
88
|
-
node =
|
88
|
+
node = Markly::Node.new(:inline_html)
|
89
89
|
node.string_content = content
|
90
90
|
return node
|
91
91
|
end
|
92
92
|
|
93
93
|
def text_node(content)
|
94
|
-
node =
|
94
|
+
node = Markly::Node.new(:text)
|
95
95
|
node.string_content = content
|
96
96
|
return node
|
97
97
|
end
|
98
98
|
|
99
99
|
def link_node(title, url, child)
|
100
|
-
node =
|
100
|
+
node = Markly::Node.new(:link)
|
101
101
|
node.title = title
|
102
102
|
node.url = url.to_s
|
103
103
|
|
@@ -112,7 +112,7 @@ module Utopia
|
|
112
112
|
"<code class=\"language-#{language}\">#{Trenni::Strings.to_html(content)}</code>"
|
113
113
|
)
|
114
114
|
else
|
115
|
-
node =
|
115
|
+
node = Markly::Node.new(:code)
|
116
116
|
node.string_content = content
|
117
117
|
return node
|
118
118
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utopia-project
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: utopia
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.14'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: markly
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|