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 7, 2022
1 parent a912aae commit 6577549
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion org-protocol-capture-html.el
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ 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
"--no-wrap \\(is deprecated\\|\\has been removed\\)."
(buffer-string))))
"--no-wrap"
"--wrap=none")))))

Expand Down

0 comments on commit 6577549

Please sign in to comment.