mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 23:41:38 -05:00
jupyter-org-font-lock-ansi-escapes: Fix regexp for fixed-width blocks
This commit is contained in:
parent
9f15db7133
commit
fda5f0b414
2 changed files with 15 additions and 2 deletions
|
@ -579,7 +579,7 @@ property."
|
||||||
(jupyter-org--ansi-color-apply-on-region beg1 end)))
|
(jupyter-org--ansi-color-apply-on-region beg1 end)))
|
||||||
;; fixed width
|
;; fixed width
|
||||||
(t
|
(t
|
||||||
(setq end (or (and (re-search-forward "^[ \t]*[^:]" nil t)
|
(setq end (or (and (re-search-forward "^[ \t]*[^ \t:]" nil t)
|
||||||
(1- (match-beginning 0)))
|
(1- (match-beginning 0)))
|
||||||
(point-max)))
|
(point-max)))
|
||||||
(jupyter-org--ansi-color-apply-on-region beg end)))))))
|
(jupyter-org--ansi-color-apply-on-region beg end)))))))
|
||||||
|
|
|
@ -2314,7 +2314,20 @@ AB[43mCD[0mEF
|
||||||
#+end_example")
|
#+end_example")
|
||||||
;; Test the cached faces path
|
;; Test the cached faces path
|
||||||
(remove-text-properties (point-min) (point-max) '(face))
|
(remove-text-properties (point-min) (point-max) '(face))
|
||||||
(funcall test-fun 24 '(19 20 21 22 23 26 27 28 29)))))
|
(funcall test-fun 24 '(19 20 21 22 23 26 27 28 29))))
|
||||||
|
(ert-info ("Leading indentation")
|
||||||
|
(with-temp-buffer
|
||||||
|
(org-mode)
|
||||||
|
(jupyter-org-interaction-mode 1)
|
||||||
|
(pop-to-buffer (current-buffer))
|
||||||
|
(let ((beg (+ (point-min) 2)) end)
|
||||||
|
(insert " : AB[43mCD[0mEF\n")
|
||||||
|
(insert " : AB[43mCD[0mEF\n")
|
||||||
|
(setq end (1- (point)))
|
||||||
|
(insert "hey\n")
|
||||||
|
(goto-char (point-min))
|
||||||
|
(jupyter-org-font-lock-ansi-escapes (point-max))
|
||||||
|
(should-not (text-property-not-all beg end 'jupyter-ansi t))))))
|
||||||
|
|
||||||
(ert-deftest jupyter-org-closest-jupyter-language ()
|
(ert-deftest jupyter-org-closest-jupyter-language ()
|
||||||
:tags '(org)
|
:tags '(org)
|
||||||
|
|
Loading…
Add table
Reference in a new issue