javalent / markdown-attributes

Add attributes to elements in Obsidian
MIT License
94 stars 7 forks source link

fail to open md file when enable plugin #22

Closed zhousihan77 closed 1 year ago

zhousihan77 commented 1 year ago

Thanks for working on the excellent plugin, I met a problem when using this plugin and dataviewjs.

Describe the bug fail to open md, error message is DOMException: Failed to execute 'setAttribute' on 'Element': 'dv.page("XXX.md").file.path' is not a valid attribute name.

Markdown Source

let dur = dv.duration("1 d");
let start = dv.current()["start"].minus(dur).toISODate();
let end = dv.current()["end"].plus(dur).toISODate();
const query = `
not done
due after ${start}
due before ${end}
tags include #pg
path includes ${dv.page("XXX.md").file.path}
`;
dv.paragraph('```tasks\n' + query + '\n```'); 

Thanks again and waiting for your response.

sigrunixia commented 1 year ago

@zhousihan77 I am receiving this error regardless if Markdown Attributes is enabled or not on App.js (If the issue was markdown attributes, the error would likely be on markdown-attributes). This appears to be a Dataview syntax issue.

Do you have an example of this working for you elsewise, such as a video or gif?