markly 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -3
- data/lib/markly/node.rb +26 -1
- data/lib/markly/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -8
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16f7d1b58c0978a73757f549d15ab5930fce2c7893345b45bc80fd5d7cd29a8f
|
4
|
+
data.tar.gz: 2232e3fd1897f656f47720fa6220896d65c6ddeafca87ab25f158d3a7939ddad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e8c4a0b0a458edca3865244a1933191f7a01749bef0cc1d9f7137a43d79c65f8de67138a89f8687018954d576a26a46ee85f18621f489d826ef6b262e0f17e2
|
7
|
+
data.tar.gz: 58221e79a6a07c53949cb5a8751df4d1d32db5fa3c976ae7ca003909e5e2ed20da4041794a57bb10db51be7baa5e06a28e022fb5d93045b5391f84d82c9d314b
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
'%�Sm�k~�PZ�,��d�˝��Lz��]��ώ"T��}�J�ћ�S�.&pɦ���Ѐ��Ue��O�^D�Q����A���N�n�4 S��V�tU|�(3���s��F��O���z�H�_��51��r
|
2
|
+
�s���Tl~��1�<��¿��Q���f9]B�>�|s�\d^�`e:���aR!B?r��R�����]��~��������ƻ�P��v�������T}���~�]b�ĺ6��~��ʠ��/�@2�a���3������c{
|
3
|
+
���������]b��]]�՝tK=ё��+\��ėί}ò3r<�ی����^�k�{9kJ�ܥ;)�Zf̲�E�� w�pW��- �>�
|
data/lib/markly/node.rb
CHANGED
@@ -17,7 +17,14 @@ module Markly
|
|
17
17
|
# Duplicate the current node and all children.
|
18
18
|
def dup
|
19
19
|
# This is a bit crazy, but it's the best I can come up with right now:
|
20
|
-
Markly.parse(self.to_markdown)
|
20
|
+
node = Markly.parse(self.to_markdown)
|
21
|
+
|
22
|
+
# If we aren't duplicating a document, we return `first_child` as the root will be a document node:
|
23
|
+
if self.type == :document
|
24
|
+
return node
|
25
|
+
else
|
26
|
+
return node.first_child
|
27
|
+
end
|
21
28
|
end
|
22
29
|
|
23
30
|
# Public: An iterator that "walks the tree," descending into children recursively.
|
@@ -142,6 +149,24 @@ module Markly
|
|
142
149
|
end
|
143
150
|
end
|
144
151
|
|
152
|
+
# Append the given node before the current node.
|
153
|
+
#
|
154
|
+
# It's okay to provide a document node, it's children will be appended.
|
155
|
+
#
|
156
|
+
# @parameter node [Markly::Node] the node to append.
|
157
|
+
def append_before(node)
|
158
|
+
if node.type == :document
|
159
|
+
node = node.first_child
|
160
|
+
end
|
161
|
+
|
162
|
+
current = self
|
163
|
+
while node
|
164
|
+
next_node = node.next
|
165
|
+
current.insert_before(node)
|
166
|
+
node = next_node
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
145
170
|
# Extract the children as a fragment.
|
146
171
|
#
|
147
172
|
# @returns [Markly::Node] the fragment.
|
data/lib/markly/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -24,7 +24,6 @@ authors:
|
|
24
24
|
- Roberto Hidalgo
|
25
25
|
- Ross Kaffenberger
|
26
26
|
- Vitaliy Klachkov
|
27
|
-
autorequire:
|
28
27
|
bindir: bin
|
29
28
|
cert_chain:
|
30
29
|
- |
|
@@ -56,10 +55,8 @@ cert_chain:
|
|
56
55
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
57
56
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
58
57
|
-----END CERTIFICATE-----
|
59
|
-
date:
|
58
|
+
date: 2025-03-22 00:00:00.000000000 Z
|
60
59
|
dependencies: []
|
61
|
-
description:
|
62
|
-
email:
|
63
60
|
executables: []
|
64
61
|
extensions:
|
65
62
|
- ext/markly/extconf.rb
|
@@ -152,7 +149,6 @@ metadata:
|
|
152
149
|
documentation_uri: https://ioquatix.github.io/markly/
|
153
150
|
funding_uri: https://github.com/sponsors/ioquatix/
|
154
151
|
source_code_uri: https://github.com/ioquatix/markly.git
|
155
|
-
post_install_message:
|
156
152
|
rdoc_options: []
|
157
153
|
require_paths:
|
158
154
|
- lib
|
@@ -167,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
163
|
- !ruby/object:Gem::Version
|
168
164
|
version: '0'
|
169
165
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
171
|
-
signing_key:
|
166
|
+
rubygems_version: 3.6.2
|
172
167
|
specification_version: 4
|
173
168
|
summary: CommonMark parser and renderer. Written in C, wrapped in Ruby.
|
174
169
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|