Run mediaembed after Twig
ItsShadowCone opened this issue · comments
I have a simple loop in Twig inside my page that iterates over an array and outputs code for mediaembed like the following
{% for video in videos %}
![]({{video}})
{% endfor %}
The problem is, that in the first hook, onPageContentRaw
, mediaembed is called with the raw twig code (before twig) whereas in the second hook (onPageContentProcessed
) it is called where the twig code is already substituted (after markdown). I would like to have mediaembed called between twig and markdown.
From what i found, wouldn't it be better if mediaembed is called within onMarkdownInitialized
instead of or additinally to the other two hooks? see this example: https://github.com/getgrav/grav/pull/747#issuecomment-206821370`