Compare commits

...

3 Commits
0.3.0 ... 0.3.4

Author SHA1 Message Date
chris
310cf3043c FIxed some bug 2022-05-24 14:56:18 +08:00
chris
c701acbfaa Added ignore 2022-05-24 14:40:36 +08:00
chris
d8c755cfce remove package lock 2022-05-24 14:38:02 +08:00
4 changed files with 6 additions and 2896 deletions

View File

@@ -6,7 +6,7 @@ on:
- "*" - "*"
env: env:
PLUGIN_NAME: your-plugin-id # Change this to match the id of your plugin. PLUGIN_NAME: obsidian-to-notion # Change this to match the id of your plugin.
jobs: jobs:
build: build:

File diff suppressed because one or more lines are too long

View File

@@ -10,6 +10,7 @@ import {
Plugin, Plugin,
PluginSettingTab, PluginSettingTab,
Setting, Setting,
normalizePath
} from "obsidian"; } from "obsidian";
import { join } from "path"; import { join } from "path";
import * as fs from "fs"; import * as fs from "fs";
@@ -95,8 +96,9 @@ export default class MyPlugin extends Plugin {
const nowFile = app.workspace.getActiveFile(); const nowFile = app.workspace.getActiveFile();
if (nowFile) { if (nowFile) {
const filePath: string = nowFile.path; const filePath: string = nowFile.path;
// @ts-ignore
const basePath: string = nowFile.vault.adapter.basePath; const basePath: string = nowFile.vault.adapter.basePath;
const fullPath = join(basePath, filePath); const fullPath = normalizePath(join(basePath, filePath));
console.log("fullpath", fullPath); console.log("fullpath", fullPath);
const fileData = fs.readFileSync(fullPath, "utf8"); const fileData = fs.readFileSync(fullPath, "utf8");
return { return {

2892
package-lock.json generated

File diff suppressed because it is too large Load Diff