]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/markup-depth-non-terminating.ly
Introduce a maximum depth for markup evaluation
[lilypond.git] / input / regression / markup-depth-non-terminating.ly
1 \version "2.15.12"
2 #(ly:set-option 'warning-as-error #f)
3
4 \header {
5   texidoc = "Markups have a maximum depth to prevent non-termination."
6
7 }
8
9 % A simple markup function that calls itself and increases its argument, so
10 % it will grow forever, unless we terminate it.
11 #(define-markup-command (recursive-explosion layout props nr)
12   (number?)
13   (interpret-markup layout props (make-recursive-explosion-markup (+ nr 1))))
14
15 \markup { Test: \recursive-explosion #1 }