mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
change lib/unicode_normalize/tables.rb to single item per line to make diffs shorter
* template/unicode_norm_gen.tmpl: Change formatting of output to produce only a single item (or range) for each line to make future diffs shorter and easier to understand and check. * lib/unicode_normalize/tables.rb: output of the above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
59a37c0283
commit
c604219e8d
2 changed files with 9000 additions and 1136 deletions
File diff suppressed because it is too large
Load diff
|
@ -42,7 +42,7 @@ end
|
||||||
class Array
|
class Array
|
||||||
def to_UTF8() collect {|c| c.to_UTF8}.join('') end
|
def to_UTF8() collect {|c| c.to_UTF8}.join('') end
|
||||||
|
|
||||||
def each_regexp_chars(n = 8) # converts an array of Integers to character ranges
|
def each_regexp_chars(n = 1) # converts an array of Integers to character ranges
|
||||||
sort.inject([]) do |ranges, value|
|
sort.inject([]) do |ranges, value|
|
||||||
if ranges.last and ranges.last[1]+1>=value
|
if ranges.last and ranges.last[1]+1>=value
|
||||||
ranges.last[1] = value
|
ranges.last[1] = value
|
||||||
|
@ -193,28 +193,28 @@ module UnicodeNormalize # :nodoc:
|
||||||
"<%end%>]"
|
"<%end%>]"
|
||||||
|
|
||||||
class_table = {
|
class_table = {
|
||||||
% combining_class.each_slice(8) do |slice|
|
% combining_class.each do |key, value|
|
||||||
<% slice.each do |key, value|%> "<%=key.to_UTF8%>"=><%=value%><%=%>,<% end%>
|
"<%=key.to_UTF8%>"=><%=value%><%=%>,
|
||||||
% end
|
% end
|
||||||
}
|
}
|
||||||
class_table.default = 0
|
class_table.default = 0
|
||||||
CLASS_TABLE = class_table.freeze
|
CLASS_TABLE = class_table.freeze
|
||||||
|
|
||||||
DECOMPOSITION_TABLE = {
|
DECOMPOSITION_TABLE = {
|
||||||
% decomposition_table.each_slice(8) do |slice|
|
% decomposition_table.each do |key, value|
|
||||||
<% slice.each do |key, value|%> "<%=key.to_UTF8%>"=>"<%=value.to_UTF8%>"<%=%>,<% end%>
|
"<%=key.to_UTF8%>"=>"<%=value.to_UTF8%>"<%=%>,
|
||||||
% end
|
% end
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
KOMPATIBLE_TABLE = {
|
KOMPATIBLE_TABLE = {
|
||||||
% kompatible_table.each_slice(8) do |slice|
|
% kompatible_table.each do |key, value|
|
||||||
<% slice.each do |key, value|%> "<%=key.to_UTF8%>"=>"<%=value.to_UTF8%>"<%=%>,<% end%>
|
"<%=key.to_UTF8%>"=>"<%=value.to_UTF8%>"<%=%>,
|
||||||
% end
|
% end
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
COMPOSITION_TABLE = {
|
COMPOSITION_TABLE = {
|
||||||
% composition_table.each_slice(8) do |slice|
|
% composition_table.each do |key, value|
|
||||||
<% slice.each do |key, value|%> "<%=key.to_UTF8%>"=>"<%=value.to_UTF8%>"<%=%>,<% end%>
|
"<%=key.to_UTF8%>"=>"<%=value.to_UTF8%>"<%=%>,
|
||||||
% end
|
% end
|
||||||
}.freeze
|
}.freeze
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue