PITS /
00561: Preview produces a page different from the saved one
Summary: Preview produces a page different from the saved one
Created: 2005-10-19 02:59
Status: Closed - not a PmWiki bug
Category: Bug
From: Stephan Elsner?
Assigned:
Priority: 4
Version: 2.0.10
OS: php 5.0.0
Description: When I use my own Box Markup:
Markup('box', 'directives', "/\\(:box(.*?):\\)/", "<div class=\"box\" style=\"$1\">"); Markup('boxend', 'directives', "/\\(:boxend:\\)/", "</div>");
in a page like this:
(:box:) box1 (:boxend:)
(:box:) box2 (:boxend:)
(:box:) box3 (:boxend:)
the preview produces cascaded boxes (box in box) the saved page renders correctly.
I think there's an error in your Markup directive, the second one needs to be specified as
Markup('boxend', '<box', "/\\(:boxend:\\)/", "</div>");
If both are specified as "directives", then there's no guarantee about the order in which they are processed and the pattern used for the "box" markup rule also matches the "(:boxend:)" directive.
--Pm