Убрать лишние символы при отображении отчетностей

This commit is contained in:
Dmitry
2026-04-08 15:35:21 +00:00
parent a246648340
commit 4484126e8f
4 changed files with 14 additions and 4 deletions
@@ -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