diff --git a/CHANGELOG.md b/CHANGELOG.md index f5a29ea..e3e97a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,4 @@ ## Improvements -- Change the way to sync the notes to notion for better debugging and error handling. - -For now, if you have any error, you will see a notice in the top-right corner of the app. You can check the error message in the developer console (F12) for more details. - -You can enter the developer console by pressing `option+cmd+I`(Mac) or `ctrl+shift+I`(Windows/Linux) in the app. - -You can also toggle the developer console from the menu `View -> Toggle Developer Tools`. - - +- update the Markdown parser to ensure that no extra `\\` is added to the end of the line when having equations in the Markdown file +- 输入公式的时候,不会在公式后面加上多余的`\\`符号 diff --git a/package.json b/package.json index 72c2209..093b156 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "typescript": "5.2.2" }, "dependencies": { - "@tryfabric/martian": "^1.2.4", + "@jxpeng98/martian": "^1.2.7", "https-proxy-agent": "^7.0.2", "node-fetch": "^3.3.2", "process": "^0.11.10", @@ -32,4 +32,4 @@ "yaml": "^2.3.4", "yaml-front-matter": "^4.1.1" } -} \ No newline at end of file +} diff --git a/src/upload/upload_general/BaseUpload2NotionGeneral.ts b/src/upload/upload_general/BaseUpload2NotionGeneral.ts index f40ddc1..11efd19 100644 --- a/src/upload/upload_general/BaseUpload2NotionGeneral.ts +++ b/src/upload/upload_general/BaseUpload2NotionGeneral.ts @@ -1,6 +1,6 @@ import { App, Notice, requestUrl, TFile } from "obsidian"; import { Client } from '@notionhq/client'; -import { markdownToBlocks, } from "@tryfabric/martian"; +import { markdownToBlocks, } from "@jxpeng98/martian"; import * as yamlFrontMatter from "yaml-front-matter"; // import * as yaml from "yaml" import MyPlugin from "src/main"; diff --git a/src/upload/upload_general/Upload2NotionGeneral.ts b/src/upload/upload_general/Upload2NotionGeneral.ts index 6649765..8405a13 100644 --- a/src/upload/upload_general/Upload2NotionGeneral.ts +++ b/src/upload/upload_general/Upload2NotionGeneral.ts @@ -1,6 +1,6 @@ import { App, Notice, TFile } from "obsidian"; import { Client } from "@notionhq/client"; -import { markdownToBlocks } from "@tryfabric/martian"; +import { markdownToBlocks } from "@jxpeng98/martian"; import * as yamlFrontMatter from "yaml-front-matter"; // import * as yaml from "yaml" import MyPlugin from "src/main"; diff --git a/src/upload/upload_next/BaseUpload2NotionNext.ts b/src/upload/upload_next/BaseUpload2NotionNext.ts index 69b3507..906f92a 100644 --- a/src/upload/upload_next/BaseUpload2NotionNext.ts +++ b/src/upload/upload_next/BaseUpload2NotionNext.ts @@ -1,6 +1,6 @@ import { App, Notice, requestUrl, TFile } from "obsidian"; import { Client } from '@notionhq/client'; -import { markdownToBlocks, } from "@tryfabric/martian"; +import { markdownToBlocks, } from "@jxpeng98/martian"; import * as yamlFrontMatter from "yaml-front-matter"; // import * as yaml from "yaml" import MyPlugin from "src/main"; diff --git a/src/upload/upload_next/Upload2NotionNext.ts b/src/upload/upload_next/Upload2NotionNext.ts index bcbf6b5..f932545 100644 --- a/src/upload/upload_next/Upload2NotionNext.ts +++ b/src/upload/upload_next/Upload2NotionNext.ts @@ -1,13 +1,13 @@ import { UploadBaseNext } from "./BaseUpload2NotionNext"; import { App, Notice, TFile } from "obsidian"; import { Client } from '@notionhq/client'; -import { markdownToBlocks, } from "@tryfabric/martian"; +import { markdownToBlocks, } from "@jxpeng98/martian"; import * as yamlFrontMatter from "yaml-front-matter"; // import * as yaml from "yaml" import MyPlugin from "src/main"; import { DatabaseDetails, PluginSettings } from "../../ui/settingTabs"; import { updateYamlInfo } from "../updateYaml"; -import { LIMITS, paragraph } from "@tryfabric/martian/src/notion"; +import { LIMITS, paragraph } from "@jxpeng98/martian/src/notion"; import fetch from 'node-fetch'; export class Upload2NotionNext extends UploadBaseNext { diff --git a/src/upload/upoload_custom/BaseUpload2NotionCustom.ts b/src/upload/upoload_custom/BaseUpload2NotionCustom.ts index 1a16b9b..cf65c5f 100644 --- a/src/upload/upoload_custom/BaseUpload2NotionCustom.ts +++ b/src/upload/upoload_custom/BaseUpload2NotionCustom.ts @@ -1,6 +1,6 @@ import { App, Notice, requestUrl, TFile } from "obsidian"; import { Client } from '@notionhq/client'; -import { markdownToBlocks, } from "@tryfabric/martian"; +import { markdownToBlocks, } from "@jxpeng98/martian"; import * as yamlFrontMatter from "yaml-front-matter"; // import * as yaml from "yaml" import MyPlugin from "src/main"; diff --git a/src/upload/upoload_custom/Upload2NotionCustom.ts b/src/upload/upoload_custom/Upload2NotionCustom.ts index 76172b5..1ebfab8 100644 --- a/src/upload/upoload_custom/Upload2NotionCustom.ts +++ b/src/upload/upoload_custom/Upload2NotionCustom.ts @@ -1,5 +1,5 @@ import {App, Notice, TFile} from "obsidian"; -import {markdownToBlocks} from "@tryfabric/martian"; +import {markdownToBlocks} from "@jxpeng98/martian"; import * as yamlFrontMatter from "yaml-front-matter"; // import * as yaml from "yaml" import MyPlugin from "src/main"; diff --git a/yarn.lock b/yarn.lock index 1910874..fab5712 100644 --- a/yarn.lock +++ b/yarn.lock @@ -124,6 +124,17 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.0.tgz#b0ffd0312b4a3fd2d6f77237e7248a5ad3a680ae" integrity sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A== +"@jxpeng98/martian@^1.2.7": + version "1.2.7" + resolved "https://registry.yarnpkg.com/@jxpeng98/martian/-/martian-1.2.7.tgz#43c8e5403064eb0bae1afe44d0c369ecdd1b4888" + integrity sha512-SeGqHRUeDkCP9SEJt5sddXit+VVoGQhx/U1ePiqcww6dbK0gnv2CiDzfgtRkBFW8zoCBzkq50m/UBS0xz/VGig== + dependencies: + "@notionhq/client" "^1.0.4" + remark-gfm "^1.0.0" + remark-math "^4.0.0" + remark-parse "^9.0.0" + unified "^9.2.1" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -153,17 +164,6 @@ "@types/node-fetch" "^2.5.10" node-fetch "^2.6.1" -"@tryfabric/martian@^1.2.4": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@tryfabric/martian/-/martian-1.2.4.tgz#3fdfe7129f1c28bccddc34854cf353b0f37c0c02" - integrity sha512-g7SP7beaxrjxLnW//vskra07a1jsJowqp07KMouxh4gCwaF+ItHbRZN8O+1dhJivBi3VdasT71BPyk+8wzEreQ== - dependencies: - "@notionhq/client" "^1.0.4" - remark-gfm "^1.0.0" - remark-math "^4.0.0" - remark-parse "^9.0.0" - unified "^9.2.1" - "@types/codemirror@5.60.8": version "5.60.8" resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.8.tgz#b647d04b470e8e1836dd84b2879988fc55c9de68"