It is not only "<:vspace">", it also encodes &, <, > into their HTML entities. MarlupToHTML does this first thing when text is passed to it (as does HandleBrowse).

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
insertion of <:vspace> into the "match"

thanks again

Simon

On Wed, 5 Jan 2022 at 15:24, Patrick R. Michaud <pmich...@pobox.com> wrote:

There's a little information on <:vspace> at
https://www.pmwiki.org/wiki/PmWiki/LayoutVariables#HTMLVSpace , including
how to disable it.

A Google search for "pmwiki vspace" will uncover a variety of posts about
what <:vspace> is and why it exists.

Pm

On Wed, Jan 05, 2022 at 02:56:40PM +1300, Simon wrote:
> I'm writing a recipe to simply show what pasted content looks like in a
> PmWiki page.
> It dumps everything between the start and end of the markup as determined
> by the Markup function in hex and ascii
> e.g.
>
>  (:simplerecipetemplate:)
> Multiple lines of
>
> t&#275;xt.(:simplerecipetemplateend:)
>
> 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&#275;xt. 05: |
> What I'd like to know is what is <:vspace> and where does it come from?
> The documentation seems silent on this.
>
> I'd prefer it was not added when there is a blank line?
>
> thanks
>
> Simon

> _______________________________________________
> pmwiki-devel mailing list
> pmwiki-devel@pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-devel



_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to