asciidoctor-json-value-loader 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor-json-value-loader.rb +5 -3
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1a49b45f4f5a1c0f95adb31f68d3869aced151c1f67be786cd0202384db8ae7
|
4
|
+
data.tar.gz: c4d25c91934d260e13e95d1db516128f27f6555fc203b8cee8f270b3eb0e8905
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 294a447855a7a7b5b2a0a8f418caf6263eccbe2fd394bc2cc24c3c2534ace4b193b6492b6691081c438362ee37a5e2df9e0c903c4eee9b9fd97ed8734fc2e40e
|
7
|
+
data.tar.gz: 243db55aada57b92ed394ef7db42161766a12ede32ce76bd305956ea5392956b2d0427552d45b0ae6acc89c5be8e0dd29f2d20bbd4290e79d2f26a9cd5030b24
|
@@ -8,13 +8,15 @@ class JsonValueLoadInlineMacro < Asciidoctor::Extensions::InlineMacroProcessor
|
|
8
8
|
use_dsl
|
9
9
|
|
10
10
|
named "json-value"
|
11
|
-
name_positional_attributes '
|
11
|
+
name_positional_attributes 'delimitter'
|
12
|
+
default_attrs 'delimiter' => '/'
|
12
13
|
|
13
14
|
def process parent, target, attrs
|
14
15
|
|
15
|
-
path, query = target.split(':')
|
16
|
+
path, query = target.split(':', 2)
|
17
|
+
delimiter = attrs['delimiter']
|
16
18
|
|
17
|
-
query = query.split(
|
19
|
+
query = query.split(delimiter).map do |q|
|
18
20
|
decoded = URI.decode_www_form_component(q)
|
19
21
|
if decoded.match(/^\d+$/) then
|
20
22
|
decoded.to_i
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-json-value-loader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- msr1k
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -24,7 +24,10 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description:
|
27
|
+
description: |
|
28
|
+
Adds asciidoctor a funciton to load specific JSON value from JSON file
|
29
|
+
|
30
|
+
(See: https://github.com/msr1k/asciidoctor-json-value-loader)
|
28
31
|
email: msr0210@gmail.com
|
29
32
|
executables: []
|
30
33
|
extensions: []
|
@@ -53,5 +56,5 @@ requirements: []
|
|
53
56
|
rubygems_version: 3.4.22
|
54
57
|
signing_key:
|
55
58
|
specification_version: 4
|
56
|
-
summary:
|
59
|
+
summary: An asciidoctor extention to load specific JSON value.
|
57
60
|
test_files: []
|