For our patterns and components that use macros (such as #5248 and #5212), we would like to some day give our users the opportunity to use our components with Jinja macros rather than plain HTML. Our current implementation of example code snippets does not allow for rendering Jinja template code, as it visits the example page, retrieves its body, and returns its HTML as-rendered, making it impossible to show Jinja template code.
We need to find a way to render Jinja template code in our examples. Then we can allow the user to switch between rendered HTML & Jinja template in the code snippet for examples that support this.
For our patterns and components that use macros (such as #5248 and #5212), we would like to some day give our users the opportunity to use our components with Jinja macros rather than plain HTML. Our current implementation of example code snippets does not allow for rendering Jinja template code, as it visits the example page, retrieves its body, and returns its HTML as-rendered, making it impossible to show Jinja template code.
We need to find a way to render Jinja template code in our examples. Then we can allow the user to switch between rendered HTML & Jinja template in the code snippet for examples that support this.