[pmwiki-users] Markup that process "fulltext" with (:blah:)....(:blahend:), but I want re-eval of some of the data in between

Christopher Cox chriscox at endlessnow.com
Fri Oct 30 09:22:15 PDT 2026


On 10/29/26 11:37 PM, Christopher Cox wrote:
> So, as I iterate on the lines of my "sourceblock" (hopefully you understand 
> that).  If I have, for example (:include SomeGroup/SomePage:), the text of the 
> page does come in, but it's not evaluated as pmwiki markup like if you normally 
> did the include.
> 
> So, my markup output html things using Keep, then the (:include SomeGroup/ 
> SomePage:) but again, I get the markup text and not the markup interpreted text.
> I tried PRR, but that didn't seem to help this case.
> 
> It's late, sorry for being terse and not trying to include actual code. 
> Hopefully "you know the issue" and can make a suggestion.
Here's the markup in it's gory-ness.  Any comments welcome, but mainly 
interested why (:include SomeGroup/SomePage:) which includes, but with no pmwiki 
eval of the markup of the included page.  Probably an ordering or something, and
I've tried a few things, but without success so far.

<?php if (!defined('PmWiki')) exit();

/*
     flexrow.php

     Row of contained things

     Example:

     (:flexrow:)
     item1
     item2
     ...
     (:flexrowend:)
*/

$RecipeInfo['FlexRow']['Version'] = '2026-10-29';


Markup(
     'flexrow',
     'fulltext',
     '/\\(:flexrow:\\)(.*?)\\(:flexrowend:\\)/si',
     "FlexRowMarkup"
);

function FlexRowMarkup($m)
{
     extract($GLOBALS["MarkupToHTML"]); # get $pagename

     @list($m0, $sourceblock) = $m;

     $sourcelines = preg_split('/\R/', $sourceblock);

     $flexrow = Keep("<div style='display:flex; gap: 1rem; background-color: 
transparent; flex-wrap: wrap;'>\n");
     foreach ($sourcelines as $line) {
         if (trim($line) === '' || trim($line) === '<:vspace>') {
             continue;
         }
         error_log("line: [" . $line . "]");
         $flexrow .= Keep("<div style='flex: 1 1 300px; overflow: hidden;'>\n");
         $flexrow .= PRR($line) . "\n";
         $flexrow .= Keep("</div>\n");
     }
     $flexrow .= Keep("</div>\n");
     return $flexrow;
}




More information about the pmwiki-users mailing list