Commit 1df2153f by Alexander Belozerov Committed by Cuong Tran

[Fix #675] Correct indentation for double-byte characters (#676)

parent a8162558
......@@ -920,7 +920,7 @@ module AnnotateModels
end
def width(string)
string.chars.inject(0) { |acc, elem| acc + (elem.bytesize == 1 ? 1 : 2) }
string.chars.inject(0) { |acc, elem| acc + (elem.bytesize == 3 ? 2 : 1) }
end
def mb_chars_ljust(string, length)
......
......@@ -1006,6 +1006,9 @@ EOS
[:active, :boolean, { limit: 1, comment: 'ACTIVE' }],
[:name, :string, { limit: 50, comment: 'NAME' }],
[:notes, :text, { limit: 55, comment: 'NOTES' }],
[:cyrillic, :text, { limit: 30, comment: 'Кириллица' }],
[:japanese, :text, { limit: 60, comment: '熊本大学 イタリア 宝島' }],
[:arabic, :text, { limit: 20, comment: 'لغة' }],
[:no_comment, :text, { limit: 20, comment: nil }],
[:location, :geometry_collection, { limit: nil, comment: nil }]
]
......@@ -1017,12 +1020,15 @@ EOS
#
# Table name: users
#
# id(ID) :integer not null, primary key
# active(ACTIVE) :boolean not null
# name(NAME) :string(50) not null
# notes(NOTES) :text(55) not null
# no_comment :text(20) not null
# location :geometry_collect not null
# id(ID) :integer not null, primary key
# active(ACTIVE) :boolean not null
# name(NAME) :string(50) not null
# notes(NOTES) :text(55) not null
# cyrillic(Кириллица) :text(30) not null
# japanese(熊本大学 イタリア 宝島) :text(60) not null
# arabic(لغة) :text(20) not null
# no_comment :text(20) not null
# location :geometry_collect not null
#
EOS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment