org-element--cache-before-change: Make sure that rx expr is always valid
* lisp/org-element.el (org-element--cache-before-change): Make sure that we never construct (repeat 1 0 "*") rx expr. Hopefully fixes https://list.orgmode.org/d8749145-29b9-39d6-5bbe-4b7e765792e5@ctpowe.net/T/#u
This commit is contained in:
parent
7a14d6035c
commit
17d4b31a84
|
@ -6534,7 +6534,8 @@ The function returns the new value of `org-element--cache-change-warning'."
|
|||
(let (min-level)
|
||||
(cl-loop while (re-search-forward
|
||||
(rx-to-string
|
||||
(if min-level
|
||||
(if (and min-level
|
||||
(> min-level 1))
|
||||
`(and bol (repeat 1 ,(1- min-level) "*") " ")
|
||||
`(and bol (+ "*") " ")))
|
||||
bottom t)
|
||||
|
|
Loading…
Reference in New Issue