We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 273a1e6 commit fae1d30Copy full SHA for fae1d30
src/main/kotlin/app/extractors/ExtractorInterface.kt
@@ -105,11 +105,18 @@ interface ExtractorInterface {
105
106
fun tokenize(line: String): List<String> {
107
// TODO(lyaronskaya): Multiline comment regex.
108
+
109
+ // TODO(anatoly): Optimize this regex, better to get rid of it.
110
val newLine = stringRegex.replace(line, "")
- val tokens = splitRegex.split(newLine).filter {
- it.isNotBlank() && !it.contains('"') && !it.contains('\'') &&
111
112
+ val tokens = newLine.split(' ', '[', ',', ';', '*', '\n', ')', '(',
113
+ '[', ']', '}', '{', '+', '-', '=', '&', '$', '!', '.', '>', '<',
114
+ '#', '@', ':', '?', ']')
115
+ .filter {
116
+ it.isNotBlank() && !it.contains('"') && !it.contains('\'') &&
117
it != "-" && it != "@"
- }
118
+ }
119
120
return tokens
121
}
122
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments