markdown-mode
markdown-mode copied to clipboard
Fontifying 450kb file errors with exceeds max-lisp-eval-depth
My file is about 450kb with 6,844 occurances of ** and 56 of *. If I open the file and invoke consult-line it fontifies the whole file and I get an error. After this the file does seem to be fontified properly and I don't see mistakes that would indicated mismatched bold or italic tags. Here's the traceback (note that position 449129 is end of file):
Backtrace
Debugger entered--Lisp error: (error "Lisp nesting exceeds `max-lisp-eval-depth'")
markdown-text-property-at-point(markdown-tilde-fence-begin)
cl--position(nil (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin) 0 nil nil)
cl-position(nil (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin) :if markdown-text-property-at-point)
apply(cl-position nil (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin) (:if markdown-text-property-at-point))
cl-find(nil (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin) :if markdown-text-property-at-point)
apply(cl-find nil (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin) :if markdown-text-property-at-point nil)
cl-find-if(markdown-text-property-at-point (markdown-tilde-fence-begin markdown-yaml-metadata-begin markdown-gfm-block-begin))
markdown-get-enclosing-fenced-block-construct(51569)
markdown-code-block-at-pos(51569)
markdown-match-inline-generic("\\(?:^\\|[^\\]\\)\\(?1:\\(?2:[*_]\\)\\(?3:[^ \\]\\2\\|[^ ]\\(?..." 449129)
markdown-match-italic(449129)
=== REPEATED 777 TIMES ===
markdown-match-italic(449129)
font-lock-fontify-keywords-region(2608 449129 nil)
font-lock-default-fontify-region(3390 449129 nil)
font-lock-fontify-region(3390 449129)
#f(compiled-function (fun) #<bytecode 0x1fe0c0f3034d>)(font-lock-fontify-region)
run-hook-wrapped(#f(compiled-function (fun) #<bytecode 0x1fe0c0f3034d>) font-lock-fontify-region)
jit-lock--run-functions(3390 449129)
jit-lock-fontify-now()
consult--fontify-all()
consult--line-candidates()
consult-line()
funcall-interactively(consult-line)
call-interactively(consult-line nil nil)
command-execute(consult-line)
Software Versions
- Markdown Mode: version 2.5-dev (latest from melpa as of 2021-02-18)
- Emacs: GNU Emacs 27.1 (build 1, x86_64-apple-darwin19.5.0, Carbon Version 162 AppKit 1894.5) of 2020-11-14
- OS: macOS 10.15.7 (Catalina)