metanorma-utils 1.8.4 → 1.8.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: acea881df59c64c2137792a3fc9bbb5a36d09dd43fc5fa6d0e3b066b3bbb60da
4
- data.tar.gz: 00fc04e75a5eec309ed1a1d62633e7c9358e93adbf0558f12bad11fa069d4441
3
+ metadata.gz: c6a75f252cf191accfebe5292830c5aa14653dcf5b4c02fda98bb1f7ec8dba85
4
+ data.tar.gz: 49a53a02959cb26c6998458151488a6ccab8c39a4b9f627d6d16dcd2d64f634f
5
5
  SHA512:
6
- metadata.gz: 2ba485eb93b52444caa930e05dc185f8506fc1d68c70483f43593e560e63ab418aeea60375e579363b120a7864046daefe4cd6ded9769491990748a88570cf83
7
- data.tar.gz: c16aecbe71a3acdede53591130d310f9745fc3b8d59a7624250d36ab93468a0f16ecc05b6251c10d6dac34bab792fd15fb0344a2cd30e606f4166b4d5ed045af
6
+ metadata.gz: 29fdfcc884ba45d8a6112d7fefacf8988e1fc49d24bdae7285ebc9fbfc869de88fdb75e10e6e9db4b8e5e1287c3fa3f722eb414f18879ad15df44853d2dc9882
7
+ data.tar.gz: d5a7e5abe280a6b5dc09cd4661ce38e722433226964aaeb4e973ce6e77aee7c439b20b0714057185ee9c7e74cd3d6dd956a79e80f3fd5031d0cbe08f721b48c2
@@ -0,0 +1,22 @@
1
+ module Sterile
2
+ class << self
3
+ alias_method :old_smart_format_rules, :smart_format_rules
4
+ =begin
5
+ # what would replace the Sterile rules with more broadly applicable \{Zs}
6
+ [/(\p{Zs}|\A|"|\(|\[)'/, "\\1‘"],
7
+ [/(\S)'([^\'\p{Zs}])/, "\\1’\\2"],
8
+ [/(\p{Zs}|\A|\(|\[)"(?!\s)/, "\\1“\\2"],
9
+ [/"(\p{Zs}|\S|\Z)/, "”\\1"],
10
+ [/'([\p{Zs}.]|\Z)/, "’\\1"],
11
+ ] + old_smart_format_rules
12
+ =end
13
+ def smart_format_rules
14
+ [
15
+ [/(\S)'([^\'\p{Zs}])/, "\\1’\\2"],
16
+ [/(\p{Zs})"(?!\s)/, "\\1“\\2"],
17
+ [/"(\p{Zs})/, "”\\1"],
18
+ [/'([\p{Zs}.])/, "’\\1"],
19
+ ] + old_smart_format_rules
20
+ end
21
+ end
22
+ end
data/lib/utils/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Utils
3
- VERSION = "1.8.4".freeze
3
+ VERSION = "1.8.5".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -292,6 +292,7 @@ files:
292
292
  - LICENSE
293
293
  - README.adoc
294
294
  - lib/metanorma-utils.rb
295
+ - lib/sterile/sterile.rb
295
296
  - lib/utils/hash_transform_keys.rb
296
297
  - lib/utils/image.rb
297
298
  - lib/utils/linestatus.rb