From f517c7a776fe7b7f88213d63223b1ae929605ac0 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sat, 12 Jun 2021 23:05:33 +0800 Subject: [PATCH] import: Allow import # and () and /x and .number --- src/ui/flutter_app/lib/mill/recorder.dart | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ui/flutter_app/lib/mill/recorder.dart b/src/ui/flutter_app/lib/mill/recorder.dart index a2cbff0b..856e3fe1 100644 --- a/src/ui/flutter_app/lib/mill/recorder.dart +++ b/src/ui/flutter_app/lib/mill/recorder.dart @@ -75,12 +75,23 @@ class GameRecorder { .replaceAll(';', ' ') .replaceAll('!', ' ') .replaceAll('?', ' ') + .replaceAll('#', ' ') + .replaceAll('()', ' ') .replaceAll('white', ' ') .replaceAll('black', ' ') .replaceAll('win', ' ') .replaceAll('lose', ' ') .replaceAll('draw', ' ') .replaceAll('resign', ' ') + .replaceAll('-/x', 'x') + .replaceAll('/x', 'x') + .replaceAll('.a', '. a') + .replaceAll('.b', '. b') + .replaceAll('.c', '. c') + .replaceAll('.d', '. d') + .replaceAll('.e', '. e') + .replaceAll('.f', '. f') + .replaceAll('.g', '. g') .split(' '); for (var i in list) {