asciidoctor-json-value-loader 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f42153124059073f5c20cadd6d3852a9059d4f89942917614902285f389bc03c
4
- data.tar.gz: a82a3c5bb0d44202b11d571581a4c233435b09af8f96971e625f59049b77ad8c
3
+ metadata.gz: c1a49b45f4f5a1c0f95adb31f68d3869aced151c1f67be786cd0202384db8ae7
4
+ data.tar.gz: c4d25c91934d260e13e95d1db516128f27f6555fc203b8cee8f270b3eb0e8905
5
5
  SHA512:
6
- metadata.gz: 37a37322e6d10e5a367a3e33399342dfa9b17dac40f6a6221add0e8797383d12c20f7e8836e70cfd702f85bfc5956e2bc67043245b9623c0da00eadb26b63f5e
7
- data.tar.gz: a75835618b1a14c60c5cba15672b1c8107fa3e73f2cf67a1009b571cd2b7c477eb47185058bceb2d67427704a261667f41d6f9f41243b165a7f684b44ef43177
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 'volnum'
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('.').map do |q|
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.1.2
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-13 00:00:00.000000000 Z
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 funcitons to load specific JSON value from JSON file
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: []