@easyops-cn/docusaurus-search-local
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -5,2 +5,8 @@ # Changelog | ||
### [0.5.2](https://github.com/easyops-cn/docusaurus-search-local/compare/v0.5.1...v0.5.2) (2020-10-18) | ||
### Bug Fixes | ||
- fix consecutive Chinese words are not matched ([db8541e](https://github.com/easyops-cn/docusaurus-search-local/commit/db8541e6598e2e99b230374b403622f8d3b8a9d3)) | ||
### 0.5.1 (2020-10-18) |
@@ -8,3 +8,3 @@ "use strict"; | ||
// https://zhuanlan.zhihu.com/p/33335629 | ||
const singleMatchOfWord = /\w+|\p{Unified_Ideograph}/u; | ||
const RegExpConsecutiveWord = /\w+|\p{Unified_Ideograph}+/u; | ||
nodejieba_1.default.load(); | ||
@@ -31,3 +31,3 @@ const splitRegExp = [/(_)([^_])/g, /([^_])(_)/g]; | ||
while (text.length > 0) { | ||
const match = text.match(singleMatchOfWord); | ||
const match = text.match(RegExpConsecutiveWord); | ||
if (!match) { | ||
@@ -34,0 +34,0 @@ break; |
{ | ||
"name": "@easyops-cn/docusaurus-search-local", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "test": "jest", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
49556
1