metanorma-utils 1.10.0 → 1.10.1

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: bdf1c0f7c6fc507ad433fe2050575ce055f637d14be8d8422841aa562c710b71
4
- data.tar.gz: 1492564fdf19ecdea102ec3042f38222ae1c495d33ccc07db74d40312d01be66
3
+ metadata.gz: fe2af0c9b9521b3ae1953545fb434d08e45d028dd93c02fa509a8251e14e1c8e
4
+ data.tar.gz: c551aa4d4c08dba83273ce0be945a171cfbbdc4a9a2c02fd09044b3c97a8b317
5
5
  SHA512:
6
- metadata.gz: c20276334e3ae738d797f823d809d45242677571f0b1746af012b08789b2da879877eb96f3196639fdc80ca1aa880294462cb07a3f36dbd91b20e8940fd84b0e
7
- data.tar.gz: 6339006703fe2e0fc338a06a5c55b5b7c38bbc899623a16b22deb18fac01967db131e7b8888fab7388a710dfda658d51db0ce76d8556285c01a54616f034ba2b
6
+ metadata.gz: f6a23dde225425211a6ac35bb0e9b718189f0bc071eeef526a36ecebd3f8572f78addf7b93c4390374511642c360b6543e88e98e459ea1bb76849d077e008730
7
+ data.tar.gz: b537b6828491a4cc6f495c462e0c0810a8b1fcd61effb326232980f07325fe70e2ddc6b9f3c09d60b1f8c6af250c38e21064617acd294f8fa3542e141d647f40
@@ -29,7 +29,7 @@ module Metanorma
29
29
  @middoc_docattr = false
30
30
  @pass = false
31
31
  elsif (@is_delim && /^(--+|\*\*+|==+|__+)$/.match?(text)) ||
32
- (!@is_delim && !@delimln && /^-----*$|^\.\.\.\.\.*$|\/\/\/\/\/*$/
32
+ (!@is_delim && !@delimln && /^-----*$|^\.\.\.\.\.*$|^\/\/\/\/\/*$/
33
33
  .match?(text))
34
34
  @delimln = text
35
35
  @pass = true
data/lib/utils/log.rb CHANGED
@@ -91,7 +91,7 @@ module Metanorma
91
91
  if node.respond_to?(:line) && !node.line.nil?
92
92
  "#{'%06d' % node.line}"
93
93
  elsif /^XML Line /.match?(msg)
94
- msg.sub(/^XML Line /, "").sub(/:.*$/, "")
94
+ msg.sub(/^XML Line /, "").sub(/(^[^:]+):.*$/, "\\1")
95
95
  else
96
96
  "000000"
97
97
  end
data/lib/utils/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Utils
3
- VERSION = "1.10.0".freeze
3
+ VERSION = "1.10.1".freeze
4
4
  end
5
5
  end
data/lib/utils/xml.rb CHANGED
@@ -99,15 +99,15 @@ module Metanorma
99
99
  end
100
100
 
101
101
  def ns(xpath)
102
- xpath.gsub(%r{/([a-zA-z])}, "/xmlns:\\1")
103
- .gsub(%r{::([a-zA-z])}, "::xmlns:\\1")
104
- .gsub(%r{\[([a-zA-z][a-z0-9A-Z@/-]* ?=)}, "[xmlns:\\1")
105
- .gsub(%r{\[([a-zA-z][a-z0-9A-Z@/-]*[/\[\]])}, "[xmlns:\\1")
102
+ xpath.gsub(%r{/([a-zA-Z])}, "/xmlns:\\1")
103
+ .gsub(%r{::([a-zA-Z])}, "::xmlns:\\1")
104
+ .gsub(%r{\[([a-zA-Z][a-z0-9A-Z@/-]* ?=)}, "[xmlns:\\1")
105
+ .gsub(%r{\[([a-zA-Z][a-z0-9A-Z@/-]*[/\[\]])}, "[xmlns:\\1")
106
106
  end
107
107
 
108
108
  def numeric_escapes(xml)
109
109
  c = HTMLEntities.new
110
- xml.split(/(&[^ \r\n\t#;]+;)/).map do |t|
110
+ xml.split(/(&[^ \r\n\t#&;]+;)/).map do |t|
111
111
  if /^(&[^ \t\r\n#;]+;)/.match?(t)
112
112
  c.encode(c.decode(t), :hexadecimal)
113
113
  else t
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-06 00:00:00.000000000 Z
11
+ date: 2024-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor