Ignore ANSI escapes when testing some Org source blocks

This commit is contained in:
Nathaniel Nicandro 2021-11-24 21:29:42 -06:00
parent a2cbebdfda
commit db450a9f44

View file

@ -549,7 +549,10 @@ results instead of an equality match."
(let ((result (buffer-substring-no-properties
(jupyter-org-element-begin-after-affiliated element)
(org-element-property :end element))))
(if regexp (should (string-match-p test-result result))
(if regexp (should (string-match-p
test-result
;; Ignore ANSI escapes for regexp matching.
(ansi-color-apply result)))
(message "\
Testing src-block: