Commit e643699 1 parent 03ead38 commit e643699 Copy full SHA for e643699
File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -144,12 +144,14 @@ def l10n_zh_remove_space(text)
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 )
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 103
103
expect ( e . encode ( c . l10n ( "Code; «code» and: code!" ) , :hexadecimal ) )
104
104
. to be_equivalent_to "Code ; « code » " \
105
105
"and : code !"
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
You can’t perform that action at this time.
0 commit comments