A plugin for Obsidian (https://obsidian.md) that adds additional `x-callback-url` endpoints to the app for common actions — it's a clean, super-charged addition to Obsidian URI.
Currently, when the the route requires an existing file path, and the sender passes a file parameter without the extension .md, the extension is added prior to the check. For existing non-notes files like canvasses (.canvas) this is a problem, because even if the full file path was passed-in, the superfluous extension is added and the check will fail, e.g. Project.canvas becomes Project.canvas.md.
Fix this by not just checking for \.md$ but against an array of allowed extensions, and only if neither of them was used, add .md.
Currently, when the the route requires an existing file path, and the sender passes a
file
parameter without the extension.md
, the extension is added prior to the check. For existing non-notes files like canvasses (.canvas
) this is a problem, because even if the full file path was passed-in, the superfluous extension is added and the check will fail, e.g.Project.canvas
becomesProject.canvas.md
.Fix this by not just checking for
\.md$
but against an array of allowed extensions, and only if neither of them was used, add.md
.ZCO-138