style(flutter): 소스의 날것 보이지 않는 글자를 이스케이프로 적는다

nbsp(본문 코드 둘 · 시험 하나)와 폭 없는 공백 · BOM(시험 하나)이 소스에 그대로
있었다 — 눈에 보이지 않아 고치다 지우거나 잘못 옮기기 쉽다. flutter 스킬 규칙대로
\u 이스케이프로 바꾼다. 뜻은 같다.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-07 04:22:19 +09:00
parent 7546af0243
commit 94da1d2031
3 changed files with 4 additions and 4 deletions
@@ -267,7 +267,7 @@ List<String>? _plainParagraphLines(dom.Element paragraph) {
final List<String> lines = <String>[];
for (final dom.Node child in paragraph.nodes) {
if (child is dom.Text) {
current.write(child.data.replaceAll(' ', ' '));
current.write(child.data.replaceAll('\u00A0', ' '));
} else if (child is dom.Element && child.localName == 'br') {
lines.add(current.toString());
current.clear();
@@ -381,7 +381,7 @@ ComposeQuote composeQuoteOf(dom.Element blockquote, {required bool keepHtml}) {
List<String> _cellsOf(dom.Element row) => <String>[
for (final dom.Element cell in row.children)
if (cell.localName == 'td' || cell.localName == 'th')
nodeTextOf(cell).replaceAll(' ', ' ').trim(),
nodeTextOf(cell).replaceAll('\u00A0', ' ').trim(),
];
/// 보낸 사람 머리 줄의 이름 — `이도윤 <doyun@…>` → "이도윤" (이름이 없으면 주소)
@@ -16,7 +16,7 @@ import 'package:flutter_test/flutter_test.dart';
import '../../support/mail_fakes.dart';
const String _nbsp = ' ';
const String _nbsp = '\u00A0';
const String _wrapper =
'<div style="font-family: \'Malgun Gothic\', \'맑은 고딕\', \'Apple SD Gothic Neo\', sans-serif; font-size: 14px; line-height: 1.75">';
const String _p = '<p style="margin: 0">';
@@ -156,7 +156,7 @@ void main() {
expect(safeFileName(r'a\b:c*d?e"f<g>h|i.txt'), 'a_b_c_d_e_f_g_h_i.txt');
expect(safeFileName('보고\u0000서\u001F.pdf'), '보고서.pdf');
expect(safeFileName('invoice\u202Efdp.exe'), 'invoicefdp.exe');
expect(safeFileName('​견적.xlsx'), '견적.xlsx');
expect(safeFileName('\u200B\uFEFF견적.xlsx'), '견적.xlsx');
});
test('앞뒤 공백 · 점을 지우고, 비면 기본 이름', () {