mirror of
https://github.com/docmost/docmost.git
synced 2026-08-26 00:07:04 +08:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
efc113de3e | ||
|
|
cd9c166927 | ||
|
|
549cf7c005 | ||
|
|
e14f499f3d | ||
|
|
b814bd0f12 | ||
|
|
b86abd3d40 | ||
|
|
3b858746e3 |
@@ -396,7 +396,10 @@ export class WorkspaceService {
|
||||
}
|
||||
}
|
||||
|
||||
if (updateWorkspaceDto.aiSearch) {
|
||||
if (
|
||||
updateWorkspaceDto.aiSearch &&
|
||||
this.environmentService.getAiVectorDriver() !== 'turbopuffer'
|
||||
) {
|
||||
const tableExists = await isPageEmbeddingsTableExists(this.db);
|
||||
if (!tableExists) {
|
||||
throw new BadRequestException(
|
||||
|
||||
+1
-1
Submodule apps/server/src/ee updated: e13af0ce05...6dfbcb9241
@@ -97,6 +97,15 @@ export function xwikiFormatter($: CheerioAPI, $root: Cheerio<any>) {
|
||||
}
|
||||
}
|
||||
|
||||
function isBareLink($el: Cheerio<any>): boolean {
|
||||
const href = $el.attr("href")?.trim();
|
||||
const text = $el.text().trim();
|
||||
|
||||
if(!text || !href) return false
|
||||
|
||||
return text === href;
|
||||
}
|
||||
|
||||
export function defaultHtmlFormatter($: CheerioAPI, $root: Cheerio<any>) {
|
||||
normalizeTableColumnWidths($, $root);
|
||||
|
||||
@@ -104,7 +113,9 @@ export function defaultHtmlFormatter($: CheerioAPI, $root: Cheerio<any>) {
|
||||
const $el = $(el);
|
||||
const url = $el.attr('href')!;
|
||||
const { provider } = getEmbedUrlAndProvider(url);
|
||||
if (provider === 'iframe') return;
|
||||
if (provider === 'iframe' || !isBareLink($el)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const embed = `<div data-type=\"embed\" data-src=\"${url}\" data-provider=\"${provider}\" data-align=\"center\" data-width=\"640\" data-height=\"480\"></div>`;
|
||||
$el.replaceWith(embed);
|
||||
|
||||
Reference in New Issue
Block a user