Numbering in FoldingText

Hi,

Scrivener (and probably others) use a syntax for numbering that is generated at compile time. For example the placeholder <$n> in the text will be an incremental number every time it is encountered, <$rst> will restart the numbering.

I wonder if anyone knows of a plugin that does something similar for FoldingText, ideally in realtime. Perhaps this could also be a way to control the behaviour of numbered lists.

Thanks in advance!
Hugo