mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
elastic: update problemId token
This commit is contained in:
1 parent
920b7c9b63
commit
333b96f34c
2 files changed
+3
-3
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hydrooj/elastic-search",
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.8",
|
||||
"main": "package.json",
|
||||
"repository": "https://github.com/hydro-dev/Hydro",
|
||||
"author": "undefined <i@undefined.moe>",
|
||||
|
||||
@@ -16,10 +16,10 @@ const processDocument = (doc: Partial<ProblemDoc>) => {
|
||||
}
|
||||
if (doc.title) {
|
||||
doc.title = doc.title.replace(/[[\]【】()()]/g, ' ')
|
||||
.replace(/([a-zA-Z]{2,})/, (a) => `${a} `);
|
||||
.replace(/([a-zA-Z]{2,})(\d+)/, '$1$2 $1 $2');
|
||||
}
|
||||
if (doc.pid) {
|
||||
doc.pid = doc.pid.replace(/([a-zA-Z]{2,})/, (a) => `${a} `);
|
||||
doc.pid = doc.pid.replace(/([a-zA-Z]{2,})(\d+)/, '$1$2 $1 $2');
|
||||
}
|
||||
return omit(doc, indexOmit);
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user