Убрать лишние символы при отображении отчетностей
This commit is contained in:
@@ -96,5 +96,16 @@ module ReportParsers
|
||||
.gsub(/[«»]/, '')
|
||||
.strip
|
||||
end
|
||||
|
||||
def normalize_line_name(value)
|
||||
text = value.to_s
|
||||
.tr("\u00A0", ' ')
|
||||
.gsub(/[⁰¹²³⁴⁵⁶⁷⁸⁹]/, '')
|
||||
.gsub(/(?<=\p{L})\d{1,2}(?=\s|\z)/u, '')
|
||||
.gsub(/\s+/, ' ')
|
||||
.strip
|
||||
|
||||
text.presence
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user