|
01: | 02: 4d75 6c74 6970 6c65 206c 696e | Multiple·lin 02: 6573 206f 66 | es·of 03: 3c3a 7673 7061 6365 3e | <:vspace> 04: 7426 2332 3735 3b78 742e | tēxt. 05: | |
<p class='vspace'></p>
),You can search for "vspace" in the mailing list archive here:
https://www.pmwiki.org/search-ml.php?split=v
Your function SimpleRecipeTemplate_Parse can do a search and replace for
these strings:
https://www.php.net/manual/en/function.str-replace.php
Note that you've positioning the markup in "fulltext", that's after some
markup would have been processed, notably escaped text, page variables,
$[i18n] strings, and markup expressions. If you want the literal text
between your 2 directives, you should position it earlier, say, after
'[='. To see the order of the rules, try
$EnableDiag=1;
and visit your pmwiki.php?action=ruleset
Petko
On 05/01/2022 07:31, Simon wrote:
> Thanks heaps PM,
> I must admit I only searched for "<:vspace">"
>
> I do understand the use of (<p class='vspace'></p>),
> for web page layout.
>
> What I don't understand is why the Markup function returns the literal
> "<:vspace>"
> instead of a blank line in the case of the text contained between the
> directive start and directive end markup
> $markup_pattern = "/\\(:"
> . 'SimpleRecipeTemplate' . "\s*(?:" . $qpattern . ")\s*:\\)"
> . "(.*?)"
> . "\\(:"
> . 'SimpleRecipeTemplateNameend' . "\s*"
> . ":\\)/sim";
> ##
> Markup("SimpleRecipeTemplate",
> 'fulltext',
> $markup_pattern,
> "SimpleRecipeTemplate_Parse" );
>
> And how I stop it inserting this unexpected and unwanted literal.
> PmWiki | PmWiki / CustomMarkup
> <https://www.pmwiki.org/wiki/PmWiki/CustomMarkup> is silent on the