mirror of
https://github.com/vkostyanetsky/ObsidianTimesheet.git
synced 2026-07-22 10:10:25 +00:00
Bugfix
This commit is contained in:
parent
bfbede6401
commit
a4b3b0701a
4 changed files with 11 additions and 11 deletions
8
package-lock.json
generated
8
package-lock.json
generated
|
|
@ -17,7 +17,7 @@
|
|||
"@typescript-eslint/parser": "5.29.0",
|
||||
"builtin-modules": "3.3.0",
|
||||
"esbuild": "0.17.3",
|
||||
"obsidian": "latest",
|
||||
"obsidian": "^1.5.7-1",
|
||||
"tslib": "2.4.0",
|
||||
"typescript": "4.7.4"
|
||||
}
|
||||
|
|
@ -1598,9 +1598,9 @@
|
|||
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="
|
||||
},
|
||||
"node_modules/obsidian": {
|
||||
"version": "1.4.11",
|
||||
"resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.4.11.tgz",
|
||||
"integrity": "sha512-BCVYTvaXxElJMl6MMbDdY/CGK+aq18SdtDY/7vH8v6BxCBQ6KF4kKxL0vG9UZ0o5qh139KpUoJHNm+6O5dllKA==",
|
||||
"version": "1.5.7-1",
|
||||
"resolved": "https://registry.npmjs.org/obsidian/-/obsidian-1.5.7-1.tgz",
|
||||
"integrity": "sha512-T5ZRuQ1FnfXqEoakTTHVDYvzUEEoT8zSPnQCW31PVgYwG4D4tZCQfKHN2hTz1ifnCe8upvwa6mBTAP2WUA5Vng==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/codemirror": "5.60.8",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
"@typescript-eslint/parser": "5.29.0",
|
||||
"builtin-modules": "3.3.0",
|
||||
"esbuild": "0.17.3",
|
||||
"obsidian": "latest",
|
||||
"obsidian": "^1.5.7-1",
|
||||
"tslib": "2.4.0",
|
||||
"typescript": "4.7.4"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -14,10 +14,10 @@ export default class TimesheetCodeBlock {
|
|||
src: string,
|
||||
body: HTMLElement,
|
||||
ctx: MarkdownPostProcessorContext
|
||||
) {
|
||||
const noteFile = plugin.app.workspace.getActiveFile();
|
||||
|
||||
if (noteFile != null) {
|
||||
) {
|
||||
const noteFile = plugin.app.vault.getFileByPath(ctx.sourcePath)
|
||||
|
||||
if (noteFile != null) {
|
||||
const taskNumberPatterns = this.getTaskNumberPatterns(src, plugin);
|
||||
const noteText = await plugin.app.vault.read(noteFile);
|
||||
const timeLogs = TimeLogsParser.timeLogs(noteText, taskNumberPatterns);
|
||||
|
|
@ -73,7 +73,7 @@ export default class TimesheetCodeBlock {
|
|||
})
|
||||
|
||||
MarkdownRenderer.render(plugin.app, lines.join("\n"), body, "", plugin)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export class TimesheetSettingTab extends PluginSettingTab {
|
|||
|
||||
display(): void {
|
||||
const { containerEl } = this;
|
||||
|
||||
|
||||
containerEl.empty();
|
||||
|
||||
new Setting(containerEl)
|
||||
|
|
|
|||
Loading…
Reference in a new issue