Skip to content

Commit

Permalink
fix: 部分场景适配网页版
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Nov 8, 2023
1 parent 3c9e9a1 commit 3eaf1d2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/adaptors/base/baseExtendApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ import { CATE_AUTO_NAME, MUST_USE_OWN_PLATFORM, MUST_USE_PICBED_PLATFORM } from
import { toRaw } from "vue"
import _ from "lodash"
import { usePreferenceSettingStore } from "~/src/stores/usePreferenceSettingStore.ts"
import { SiyuanDevice } from "zhi-device"
import { SypConfig } from "~/syp.config.ts"
import { usePlatformMetadataStore } from "~/src/stores/usePlatformMetadataStore.ts"
import path from "node:path"

/**
* 各种模式共享的扩展基类
Expand Down Expand Up @@ -241,8 +241,6 @@ class BaseExtendApi extends WebApi implements IBlogApi, IWebApi {
cfg.usePathCategory = true
}
// 获取笔记层级
const win = SiyuanDevice.siyuanWindow()
const path = win.require("path")
const save_dir = path.dirname(post.link)
// 使用层级作为文件保存路径
if (cfg.usePathCategory) {
Expand Down Expand Up @@ -567,9 +565,6 @@ class BaseExtendApi extends WebApi implements IBlogApi, IWebApi {
) {
const { pref, cfg, setting } = options
const that = this
const win = SiyuanDevice.siyuanWindow()
const path = win.require("path")

const matches = Array.from(text.matchAll(regex))

let replacedText = text
Expand Down

0 comments on commit 3eaf1d2

Please sign in to comment.