Skip to content

Commit

Permalink
fix: #38 换行符问题
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed May 23, 2023
1 parent 3ff577c commit 74c00c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/kernel-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import { BaseApi, SiyuanData } from "./base-api"
import { mediaDir, siyuanApiToken, siyuanApiUrl } from "../Constants"
import { fetchPost } from "siyuan"

import shortHash from "shorthash2"
/**
* 思源笔记服务端API v2.8.8
*
Expand Down Expand Up @@ -102,7 +102,7 @@ class KernelApi extends BaseApi {
*/
public async convertPandoc(type: string, from: string, to: string): Promise<SiyuanData> {
const args = {
args: ["--to", type, from, "-o", to, "--extract-media", mediaDir],
args: ["--to", type, from, "-o", to, "--extract-media", `${mediaDir}/${shortHash(from)}`, "--wrap=none"],
}
return await this.siyuanRequest("/api/convert/pandoc", args)
}
Expand Down

0 comments on commit 74c00c0

Please sign in to comment.