This is an attempt to minimize the problem described here Is it possible to remove duplicate wikitext code when showing both codeblocks and the result of rendering them? - #6 by vuk
I tried to remove all additional context to come up with a minimal example that could reproduce the problem.
Wikitext:
<$wikify text="""\function myfunc() [[myfunc() function body]]
\end
<<myfunc>>
""" name="result"><<result>>
</$wikify>
---
<$wikify text="""\function myfunc() [[myfunc() function body]]
\end myfunc
<<myfunc>>
""" name="result"><<result>>
</$wikify>
Neither example produces the expected output: the line starting with \end
function marker shows up in the rendered output, regardless or having the name of the function or not:
\endmyfunc() function body
---
\end myfuncmyfunc() function body