Skip to content

Commit 2d84f7a

Browse files
committed
Escape shell commands to handle filenames with spaces, etc.
Thanks to Marcin Kasperski for a patch.
1 parent a0836cb commit 2d84f7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

markdown-mode.el

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,8 @@ Calls `markdown-cycle' with argument t."
17151715
;; Handle case when `markdown-command' does not read from stdin
17161716
(if (not buffer-file-name)
17171717
(error "Must be visiting a file")
1718-
(shell-command (concat markdown-command " " buffer-file-name)
1718+
(shell-command (concat markdown-command " "
1719+
(shell-quote-argument buffer-file-name))
17191720
output-buffer-name))
17201721
;; Pass region to `markdown-command' via stdin
17211722
(shell-command-on-region begin-region end-region markdown-command

0 commit comments

Comments
 (0)