Skip to content

Commit

Permalink
Fix pandoc "--no-wrap" option detection
Browse files Browse the repository at this point in the history
The option "--no-wrap" has removed in pandoc v2.19.2, and therefore the output
of running "pandoc --no-wrap" is not "--no-wrap is deprecated", but "--no-wrap
has been removed". This fix detects both error messages to determine whether the
option should be "--no-wrap" or "--wrap=none".
  • Loading branch information
YorkZ committed Dec 9, 2022
1 parent a912aae commit 2fa7726
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion org-protocol-capture-html.el
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ Pandoc >= 1.16 deprecates `--no-wrap' in favor of
(sleep-for 0.2)
(cl-incf checked)))
(if (and (zerop (process-exit-status process))
(not (string-match "--no-wrap is deprecated" (buffer-string))))
(not (string-match
(rx (: (1+ blank) "--no-wrap"
(| "is deprecated" "has been removed")))
(buffer-string))))
"--no-wrap"
"--wrap=none")))))

Expand Down

0 comments on commit 2fa7726

Please sign in to comment.