slaw 0.14.0 → 0.14.1
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
- data/.travis.yml +3 -3
- data/README.md +4 -0
- data/lib/slaw/version.rb +1 -1
- data/lib/slaw/za/act.treetop +1 -1
- data/lib/slaw/za/act_nodes.rb +11 -1
- data/spec/za/act_inline_spec.rb +15 -0
- 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: 9743f6466d2fd51cf2b0ed43330c8eecc7855541
|
|
4
|
+
data.tar.gz: 00a887ed43d64cd0788cda9ebe75be7c8a1af9aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2d31f8d468e1dda7b0ee056d12c83fd31cac8e0c647f3a9526dc543ae34a52a5ddb8d3b3299eba310ca5e7fe437594c4686d93570348f16dc98eceba4ad54fe
|
|
7
|
+
data.tar.gz: 93b9c10f53b69c939b1a90347355561ab07af581aee1f155415a937a55f8f3238a03a4e31c859fdea895aa1bd8f9023f472ec82bfe87c1b6d4c109c8c8f1d630
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
|
@@ -218,6 +218,10 @@ Akoma Ntoso `component` elements at the end of the XML document, with a name of
|
|
|
218
218
|
|
|
219
219
|
## Changelog
|
|
220
220
|
|
|
221
|
+
### 0.14.1
|
|
222
|
+
|
|
223
|
+
* Support links in remarks
|
|
224
|
+
|
|
221
225
|
### 0.14.0
|
|
222
226
|
|
|
223
227
|
* Support inline image tags, using Markdown syntax: \
|
data/lib/slaw/version.rb
CHANGED
data/lib/slaw/za/act.treetop
CHANGED
data/lib/slaw/za/act_nodes.rb
CHANGED
|
@@ -308,7 +308,17 @@ module Slaw
|
|
|
308
308
|
|
|
309
309
|
class Remark < Treetop::Runtime::SyntaxNode
|
|
310
310
|
def to_xml(b, idprefix)
|
|
311
|
-
b.remark(
|
|
311
|
+
b.remark(status: 'editorial') do |b|
|
|
312
|
+
b << '['
|
|
313
|
+
for e in content.elements
|
|
314
|
+
if e.respond_to? :to_xml
|
|
315
|
+
e.to_xml(b, idprefix)
|
|
316
|
+
else
|
|
317
|
+
b << e.text_value
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
b << ']'
|
|
321
|
+
end
|
|
312
322
|
end
|
|
313
323
|
end
|
|
314
324
|
|
data/spec/za/act_inline_spec.rb
CHANGED
|
@@ -274,6 +274,21 @@ EOS
|
|
|
274
274
|
</item>
|
|
275
275
|
</blockList>
|
|
276
276
|
</content>
|
|
277
|
+
</paragraph>'
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
it 'should handle a link in an inline remark' do
|
|
281
|
+
node = parse :block_paragraphs, <<EOS
|
|
282
|
+
This statement has [[a [link in](/foo/bar) a remark]]
|
|
283
|
+
This statement has [[[a link in](/foo/bar) a remark]]
|
|
284
|
+
This statement has [[a [link in a remark](/foo/bar)]]
|
|
285
|
+
EOS
|
|
286
|
+
to_xml(node, "").should == '<paragraph id="paragraph-0">
|
|
287
|
+
<content>
|
|
288
|
+
<p>This statement has <remark status="editorial">[a <ref href="/foo/bar">link in</ref> a remark]</remark></p>
|
|
289
|
+
<p>This statement has <remark status="editorial">[<ref href="/foo/bar">a link in</ref> a remark]</remark></p>
|
|
290
|
+
<p>This statement has <remark status="editorial">[a <ref href="/foo/bar">link in a remark</ref>]</remark></p>
|
|
291
|
+
</content>
|
|
277
292
|
</paragraph>'
|
|
278
293
|
end
|
|
279
294
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: slaw
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.14.
|
|
4
|
+
version: 0.14.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Greg Kempe
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|