Просмотр исходного кода

refs #84539: split double quote keywords block
- Collect code
- rename value
- remove unused logic

NEEDLEMAN3\tatsu 4 лет назад
Родитель
Сommit
3656f2515b
1 измененных файлов с 1 добавлено и 3 удалено
  1. 1 3
      packages/app/src/components/Page/RevisionRenderer.jsx

+ 1 - 3
packages/app/src/components/Page/RevisionRenderer.jsx

@@ -68,9 +68,7 @@ class LegacyRevisionRenderer extends React.PureComponent {
     // Separate keywords
     // - Surrounded by double quotation
     // - Split by both full-width and half-width spaces
-    [...keywords.match(/"[^"]+"|[^\u{20}\u{3000}]+/ug)].forEach((separatedKeyword, i) => {
-      // Removes double quotes from keywords and trims start and end blanks
-      const keyword = separatedKeyword.replace(/"/g, '').trim();
+    [...keywords.match(/"[^"]+"|[^\u{20}\u{3000}]+/ug)].forEach((keyword, i) => {
       if (keyword === '') {
         return;
       }