mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 09:38:19 +08:00
bug fix
This commit is contained in:
1 parent
560e920624
commit
d59710ddf1
13 files changed
+181
-49
No files matched your search
@@ -308,10 +308,14 @@ async function domainUser(src, report) {
|
||||
}
|
||||
}
|
||||
|
||||
function addSpace(content) {
|
||||
return content.split('\n').map((line) => (line.endsWith(' ') ? line : `${line} `)).join('\n');
|
||||
}
|
||||
|
||||
async function fix(doc) {
|
||||
await dst.collection('document').updateOne(
|
||||
{ _id: doc._id },
|
||||
{ $set: { pid: doc.pid || doc.docId.toString() } },
|
||||
{ $set: { pid: doc.pid || doc.docId.toString(), content: addSpace(doc.content) } },
|
||||
);
|
||||
if (doc.data && doc.data.generationTime) {
|
||||
await file.inc(doc.data);
|
||||
|
||||
Reference in new issue
Block a user