Skip to content

Commit

Permalink
Fixed bug whereby Windows downloaded attachments would not always wor…
Browse files Browse the repository at this point in the history
…k (being interpreted as C:/C:/...)
  • Loading branch information
jglev committed Jan 6, 2023
1 parent 4bc286d commit 7f1743a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
6 changes: 1 addition & 5 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,7 @@ export default class PastetoIndentationPlugin extends Plugin {
// file:
// !new RegExp("^([a-zA-Z])+://").test(src);
if (srcIsLocalFile) {
let urlForDownloading = src;

if (src.startsWith("file:///")) {
urlForDownloading = src.replace(/^file:\/\/\//, "");
}
const urlForDownloading = src.replace(/^file:\/{2,3}/, "");

dataBlob = new Blob([
await FileSystemAdapter.readLocalFile(urlForDownloading),
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-paste-to-current-indentation",
"name": "Paste Mode",
"version": "5.0.0",
"version": "5.0.1",
"minAppVersion": "1.0.0",
"description": "Paste content and mark block quotes at any level of indentation.",
"author": "Jacob Levernier",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "obsidian-paste-to-current-indentation",
"version": "5.0.0",
"version": "5.0.1",
"description": "This plugin allows pasting and marking text as block-quotes at any level of indentation.",
"main": "main.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"3.0.2": "0.14.6",
"3.1.0": "0.14.6",
"4.0.0": "0.14.6",
"5.0.0": "1.0.0"
"5.0.0": "1.0.0",
"5.0.1": "1.0.0"
}

0 comments on commit 7f1743a

Please sign in to comment.