Macros are currently static: they are rendered only based on their parameters. They should also be allowed to be reactive, meaning they can dynamically change based on the surrounding document. For instance, a table of contents macro would update itself whenever a title is added / modified / removed from the document. Investigate performance issues that may arise from analyzing every change in the document, especially analyzing deeply-nested items. |