-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip empty URLs when inlining images
Markdown links like `[foo]()`, while basically invalid, do not usually cause too much trouble, or at least shouldn't cause problems in unrelated code. It so happens that if a document happens to have such a link, `markdown-toggle-inline-images` will crash with: insert-file-contents-literally: not a regular file: /tmp/default-directory-path/ This patch fixes the problem by checking if the `file` path extracted from the regex is empty before proceeding with treating it like an image.
- Loading branch information
Showing
2 changed files
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters