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 +4 -4
- data/lib/sterile/sterile.rb +22 -0
- data/lib/utils/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c6a75f252cf191accfebe5292830c5aa14653dcf5b4c02fda98bb1f7ec8dba85
|
|
4
|
+
data.tar.gz: 49a53a02959cb26c6998458151488a6ccab8c39a4b9f627d6d16dcd2d64f634f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
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
|
+
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
|