ProcessHannaCode icon indicating copy to clipboard operation
ProcessHannaCode copied to clipboard

hanna code code doesn't appear to be re-entrant

Open jeanrajotte opened this issue 10 years ago • 1 comments

I have defined [[blog_list template=blog_stub]] and use it in the body of page X. It uses this PHP:

<?php
foreach(wire('pages')->find("template={$template}") as $p) {
  echo <<<END
<div class='entry'>
    <h3><a href='{$p->a_url}'>{$p->title}</a></h3>
    <div class='excerpt'>{$p->excerpt}</div>
</div>
END;
}

The excerpt field also uses the Hanna code textformatter. The only output is that of the last $p->excerpt, as opposed to the whole list with formatted parts.

IOW, it looks like the last output from $hanna->render() hijacks the one up the stack.

jeanrajotte avatar Oct 15 '14 18:10 jeanrajotte

I added a pull request which supports now recursive Hanna Code tags and this should fix the re-entrance issue as well. Maybe you can apply the changes locally and check if it fixes the reported issue.

https://github.com/ryancramerdesign/ProcessHannaCode/pull/10

hwmaier avatar Jan 22 '15 11:01 hwmaier