asciidoctor-json-value-loader 0.1.2 → 0.2.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
- data/lib/asciidoctor-json-value-loader.rb +5 -3
- metadata +4 -3
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
|
|
@@ -25,7 +25,8 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
description: |
|
|
28
|
-
Adds asciidoctor a
|
|
28
|
+
Adds asciidoctor a funciton to load specific JSON value from JSON file
|
|
29
|
+
|
|
29
30
|
(See: https://github.com/msr1k/asciidoctor-json-value-loader)
|
|
30
31
|
email: msr0210@gmail.com
|
|
31
32
|
executables: []
|