Skip to content

Commit

Permalink
Merge pull request #20 from Yarden-zamir/patch-2
Browse files Browse the repository at this point in the history
Fix link not created if whitespace selected
  • Loading branch information
dhamaniasad authored May 1, 2023
2 parents dff9c00 + 2a1ab28 commit bdd179c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class ObsidianRichLinksPlugin extends Plugin {

urlToIframe(editor: Editor): void {
let selectedText = editor.somethingSelected()
? editor.getSelection()
? editor.getSelection().trim()
: false;

if (selectedText && this.isUrl(selectedText)) {
Expand Down

0 comments on commit bdd179c

Please sign in to comment.