isodoc-i18n 1.1.0 → 1.1.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: 71a7b4e2dcb8b00587cc92988c85a99c411444fb8698f8bd067c92a4f90751e2
4
- data.tar.gz: 6304cf921c57b555ff259b9c1dfad4d7306e726c7f56f08291e4959a188a6181
3
+ metadata.gz: 8f00540677aae6f53c0c517b376529ce6eb5094c6cebd1d1a9b31ce20e346266
4
+ data.tar.gz: 69dd44b3aedc560540c5de52f05f0ae11b1332edccb4565817845648f23a9631
5
5
  SHA512:
6
- metadata.gz: 9de07fcd21fdfd8ba2ab4d758f76952cbfe84075caad216543cd0a6fa2bcf409fab8e71bc71309aa98ed50342727be9a46c5ffc2625c27f987ede80c65e29b18
7
- data.tar.gz: fff4809002eef23c8d550baed4fb1185f134b99fb7a61733d3413045134b11b1e18eaab54a8787e0e4817601ff9051d67ffc1efc97cfaa589a73320188e70d98
6
+ metadata.gz: 8b3a53fe9058b2cba6f929938e61147adcb6eaa0782705ca2097cf448f63a76500abbe4b4d3513b9d0cfca04456547d8127e278ef7a521ec3b1cff6de8302f58
7
+ data.tar.gz: 24ff8195e4172769e91fc4f879fe6835b4f24170041e16198ab3a405625f07ed56bce3a702604b5cb25102b4d6f21ce87d5d92889122cd524a4694549ba8d0c8
data/lib/isodoc/i18n.rb CHANGED
@@ -144,12 +144,14 @@ module IsoDoc
144
144
  end
145
145
 
146
146
  def l10n_fr1(text, locale)
147
- text = text.gsub(/(?<=\p{Alnum})([»›;?!])/, "\u202f\\1")
147
+ text = text.gsub(/(?<=\p{Alnum})([»›;?!])(?=\s)/, "\u202f\\1")
148
+ text = text.gsub(/(?<=\p{Alnum})([»›;?!])$/, "\u202f\\1")
148
149
  text = text.gsub(/^([»›;?!])/, "\u202f\\1")
149
150
  text = text.gsub(/([«‹])/, "\\1\u202f")
150
151
  colonsp = locale == "CH" ? "\u202f" : "\u00a0"
151
- text = text.gsub(/(?<=\p{Alnum})(:)/, "#{colonsp}\\1")
152
- text.gsub(/^(:)/, "#{colonsp}\\1")
152
+ text = text.gsub(/(?<=\p{Alnum})(:)(?=\s)/, "#{colonsp}\\1")
153
+ text = text.gsub(/(?<=\p{Alnum})(:)$/, "#{colonsp}\\1")
154
+ text.gsub(/^(:\s)/, "#{colonsp}\\1")
153
155
  end
154
156
 
155
157
  def boolean_conj(list, conn)
@@ -1,5 +1,5 @@
1
1
  module IsoDoc
2
2
  class I18n
3
- VERSION = "1.1.0".freeze
3
+ VERSION = "1.1.1".freeze
4
4
  end
5
5
  end
@@ -103,6 +103,8 @@ RSpec.describe IsoDoc::I18n do
103
103
  expect(e.encode(c.l10n("Code; «code» and: code!"), :hexadecimal))
104
104
  .to be_equivalent_to "Code&#x202f;; &#xab;&#x202f;code&#x202f;&#xbb; "\
105
105
  "and&#x202f;: code&#x202f;!"
106
+ expect(e.encode(c.l10n("http://xyz a;b"), :hexadecimal))
107
+ .to be_equivalent_to "http://xyz a;b"
106
108
  end
107
109
 
108
110
  it "does boolean conjunctions" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc-i18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.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: 2022-09-25 00:00:00.000000000 Z
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities