Skip to content

Commit

Permalink
Fixed bug whereby spaces in URL for local download were not being par…
Browse files Browse the repository at this point in the history
…sed correctly.
  • Loading branch information
jglev committed Mar 8, 2023
1 parent a6589ea commit 283d940
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export default class PastetoIndentationPlugin extends Plugin {
// file:
// !new RegExp("^([a-zA-Z])+://").test(src);
if (srcIsLocalFile) {
let urlForDownloading = src.replace(/^file:\/{2}/, "");
let urlForDownloading = decodeURI(src).replace(/^file:\/{2}/, "");

if (/^\/[A-Za-z]:/.test(urlForDownloading)) {
// We are likely in Windows, and need to remove an additional
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.1",
"version": "5.0.2",
"minAppVersion": "1.1.1",
"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.1",
"version": "5.0.2",
"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 @@ -13,5 +13,6 @@
"3.1.0": "0.14.6",
"4.0.0": "0.14.6",
"5.0.0": "1.0.0",
"5.0.1": "1.1.1"
"5.0.1": "1.1.1",
"5.0.2": "1.1.1"
}

0 comments on commit 283d940

Please sign in to comment.