PmWiki version 2.2.110 and newer have the variable
$MarkupMarkupLevel which has exactly the same value as this recipe ($SignalMarkupMarkup).
Questions answered by this recipe
How can I tell whether my markup function is called within
(:markup:) source code?
The script sets a global variable,
$SignalMarkupMarkup, that tells you whether and how deep the 'markup chain' (MarkupToHTML / MarkupTable execution)
is inside a
(:markup:) code sequence.
Some cookbooks like SlimTableOfContents, TitleMarkup, SectionEdit
need to know or should at least care about that.
They should / should not / should differently execute their code inside
(:markup:) page source text.
Whenever you need to know whether your own markup is evaluated within
check the value of
$SignalMarkupMarkup == 0 - we are NOT in a (:markup:) sequence $SignalMarkupMarkup == 1...n we are in the n'th level
Works by redirecting the markups 'markup' and 'markupend'.
If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".
- (2009-02-01) Initial version
- (2016-10-23) Update for PHP 5.5 compatibility (by Siegfried Seibert)