Adds content column to documents and revisions as JSON snapshot (#6179)

This commit is contained in:
Tom Moor
2023-12-17 10:51:11 -05:00
committed by GitHub
parent 78b9322a28
commit 1840370e6f
18 changed files with 411 additions and 174 deletions

View File

@@ -10,8 +10,8 @@ import parseTitle from "@shared/utils/parseTitle";
import { DocumentValidation } from "@shared/validations";
import { traceFunction } from "@server/logging/tracing";
import { User } from "@server/models";
import DocumentHelper from "@server/models/helpers/DocumentHelper";
import ProsemirrorHelper from "@server/models/helpers/ProsemirrorHelper";
import TextHelper from "@server/models/helpers/TextHelper";
import turndownService from "@server/utils/turndown";
import { FileImportError, InvalidRequestError } from "../errors";
@@ -203,7 +203,7 @@ async function documentImporter({
// to match our hardbreak parser.
text = text.trim().replace(/<br>/gi, "\\n");
text = await DocumentHelper.replaceImagesWithAttachments(
text = await TextHelper.replaceImagesWithAttachments(
text,
user,
ip,