Skip to content

Commit

Permalink
fix: decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Benature committed Aug 14, 2023
1 parent 40ea320 commit a1e012d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,8 @@ export default class TextFormat extends Plugin {
case "decodeURI":
replacedText = selectedText.replace(
/(https?|ftp|file):\/\/[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/g,
function (t) {
return decodeURI(t);
}
).replace(/\s/g, "%20");
function (t) { return decodeURI(t).replace(/\s/g, "%20"); }
);
break;
case "hyphen":
replacedText = selectedText.replace(/(\w)-[ ]/g, "");
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-text-format",
"name": "Text Format",
"version": "2.2.6",
"version": "2.2.7",
"minAppVersion": "0.9.7",
"description": "Format selected text lowercase/uppercase/capitalize/titlecase or remove redundant spaces/newline characters.",
"author": "Benature",
Expand Down

0 comments on commit a1e012d

Please sign in to comment.