Skip to content

Commit

Permalink
fix: #1202 ignore outer link when cfg is set
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Dec 16, 2024
1 parent fe3a36b commit 2993d8c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/adaptors/base/baseExtendApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,15 @@ class BaseExtendApi extends WebApi implements IBlogApi, IWebApi {
const posidKey = cfg.posidKey
// eslint-disable-next-line no-prototype-builtins
if (!postMeta.hasOwnProperty(posidKey)) {
// 配置了忽略块链接的直接用纯文本
// https://github.com/terwer/siyuan-plugin-publisher/issues/1202#issuecomment-2542653498
// outerLink = `siyuan://blocks/${id}`
// 包括未配置和未勾选
if (pref.value.ignoreBlockRef !== true) {
this.logger.error("引用的文档尚未发布,您可以删除此外链再发布,或者先发布外链文章 =>", id)
throw new Error(`引用的文档 ${id} 尚未发布,您可以删除此外链再发布,或者先发布外链文章`)
}
// 配置了忽略块链接的直接用纯文本
// https://github.com/terwer/siyuan-plugin-publisher/issues/1202#issuecomment-2542653498
// outerLink = `siyuan://blocks/${id}`
replacedText = replacedText.replace(fullMatch, processedTitle)
} else {
let previewUrl: string
const postid = postMeta[posidKey]
Expand Down

0 comments on commit 2993d8c

Please sign in to comment.