PmSyntaxHighlighting

Test PmSyntax highlighting
See $EnableHighlight (Not to be confused with $EnablePmSyntax) and WikiStyles#highlight.

%hlt html%[@<div>Testing <strong>strong</strong>. </div>@]

%hlt html%@@<div>Testing <strong>strong</strong>. </div>@@

%hlt html%[=<div>Testing <strong>strong</strong>. </div>=] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%hlt html%@@[=<div>Testing <strong>strong</strong>. </div>=]@@

<div>Testing <strong>strong</strong>. </div>

<div>Testing <strong>strong</strong>. </div>

<div>Testing <strong>strong</strong>. </div> This is rendered neither as <pre> nor as <code>, so ignored.

<div>Testing <strong>strong</strong>. </div>

%hlt php%[@ $EnablePmSyntax = 1; // or 2, see below @]

%hlt php%@@ $EnablePmSyntax = 1; // or 2, see below @@

%hlt php%[= $EnablePmSyntax = 1; // or 2, see below =] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%hlt php%@@[= $EnablePmSyntax = 1; // or 2, see below =]@@

$EnablePmSyntax = 1; // or 2, see below

$EnablePmSyntax = 1; // or 2, see below

$EnablePmSyntax = 1; // or 2, see below This is rendered neither as <pre> nor as <code>, so ignored.

$EnablePmSyntax = 1; // or 2, see below

PmWiki markup using "%hlt pmwiki%"

%hlt pmwiki%[@(:div:)Testing '''strong'''. (:div:)@]

%hlt pmwiki%@@(:div:)Testing '''strong'''. (:div:)@@ ''This is not escaped, inner HTML (bold around "strong") is converted to plain text.''

%hlt pmwiki%[=(:div:)Testing '''strong'''. (:div:)=] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%hlt pmwiki%@@[=(:div:)Testing '''strong'''. (:div:)=]@@

(:div:)Testing '''strong'''. (:div:)

(:div:)Testing strong. (:div:) This is not escaped, inner HTML (bold around "strong") is converted to plain text.

(:div:)Testing '''strong'''. (:div:) This is rendered neither as <pre> nor as <code>, so ignored.

(:div:)Testing '''strong'''. (:div:)

* $FullName 
* {$FullName}
%hlt pmwiki%[@{$FullName}@]

%hlt pmwiki%@@{$FullName}@@ ''This is <code> but inside is the full name, not the variable.''

%hlt pmwiki%[={$FullName}=] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%hlt pmwiki%@@[={$FullName}=]@@

{$FullName}

Test.PmSyntaxHighlighting This is <code> but inside is the full name, not the variable.

{$FullName} This is rendered neither as <pre> nor as <code>, so ignored.

{$FullName}

%hlt pmwiki%[@[[{$FullName}]]@]

%hlt pmwiki%@@[[{$FullName}]]@@ ''This is <code> but inner HTML (link) is converted to plain text.''

%hlt pmwiki%[=[[{$FullName}]]=] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%hlt pmwiki%@@[=[[{$FullName}]]=]@@

[[{$FullName}]]

Test.PmSyntaxHighlighting This is <code> but inner HTML (link) is converted to plain text.

[[{$FullName}]] This is rendered neither as <pre> nor as <code>, so ignored.

[[{$FullName}]]


Using "%pmhlt%"

%pmhlt%[@(:div:)Testing '''strong'''. (:div:)@]

%pmhlt%@@(:div:)Testing '''strong'''. (:div:)@@

%pmhlt%[=(:div:)Testing '''strong'''. (:div:)=] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%pmhlt%@@[=(:div:)Testing '''strong'''. (:div:)=]@@

(:div:)Testing '''strong'''. (:div:)

(:div:)Testing strong. (:div:)

(:div:)Testing '''strong'''. (:div:) This is rendered neither as <pre> nor as <code>, so ignored.

(:div:)Testing '''strong'''. (:div:)

%pmhlt%[@{$FullName}@]

%pmhlt%@@{$FullName}@@ ''This is <code> but inside is the full name, not the variable.''

%pmhlt%[={$FullName}=] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%pmhlt%@@[={$FullName}=]@@

{$FullName}

Test.PmSyntaxHighlighting This is <code> but inside is the full name, not the variable.

{$FullName} This is rendered neither as <pre> nor as <code>, so ignored.

{$FullName}

%pmhlt%[@[[{$FullName}]]@]

%pmhlt%@@[[{$FullName}]]@@ ''This is <code> but inner HTML (link) is converted to plain text.''

%pmhlt%[=[[{$FullName}]]=] ''This is rendered neither as <pre> nor as <code>, so ignored.''

%pmhlt%@@[=[[{$FullName}]]=]@@

[[{$FullName}]]

Test.PmSyntaxHighlighting This is <code> but inner HTML (link) is converted to plain text.

[[{$FullName}]] This is rendered neither as <pre> nor as <code>, so ignored.

[[{$FullName}]]


two different highlight on same line
>>pre<<
-> %hlt html%[@<!--PageFooterFmt-->@]@@          @@%pmhlt%@@[=(:nofooter:)=]@@
-> %hlt html%[@<!--PageTitleFmt-->@]@@           @@%pmhlt%@@[=(:notitle:)=]@@
>><<
<!--PageFooterFmt--> (:nofooter:)
<!--PageTitleFmt--> (:notitle:)
can't see how to preserve spacing
-> %hlt html%[@<!--PageLeftFmt-->@]@@                @@%pmhlt%[@(:noleft:)@]
-> %hlt html%[@<!--PageLeftFmt-->                @]%pmhlt%[@(:noleft:)@]
-> @@%hlt html%[=<!--PageRightFmt-->=]               %pmhlt%[=(:noright:)=]@@
-> %hlt html%@@[=<!--PageFooterFmt-->=]              @@%pmhlt%@@[=(:nofooter:)=]@@
-> %hlt html%@@[=<!--PageTitleFmt-->=]               %pmhlt%[=(:notitle:)=]@@

>>indent<<
||border=0
||%hlt html%[@<!--PageLeftFmt-->@] ||%pmhlt%[@(:noleft:)@] ||
||%hlt html%[@<!--PageRightFmt-->@] ||%pmhlt%[@(:noright:)@] ||
>><<
<!--PageLeftFmt--> (:noleft:)
<!--PageLeftFmt--> (:noleft:)
<!--PageRightFmt--> (:noright:)
<!--PageFooterFmt--> (:nofooter:)
<!--PageTitleFmt--> (:notitle:)
<!--PageLeftFmt-->(:noleft:)
<!--PageRightFmt-->(:noright:)

It may be a good idea for (:markup:) to have a built-in way to display these kinds of things, and highlight them, without the need to use %hlt% and %pmhlt%. --Petko

 0: 00.00 00.00 config start
 1: 00.01 00.01 config end
 2: 00.21 00.21 MarkupToHTML begin
 3: 00.21 00.21 MarkupToHTML begin
 4: 00.22 00.22 MarkupToHTML end
 5: 00.22 00.22 MarkupToHTML begin
 6: 00.24 00.24 MarkupToHTML end
 7: 00.24 00.24 MarkupToHTML begin
 8: 00.24 00.24 MarkupToHTML end
 9: 00.24 00.24 MarkupToHTML begin
10: 00.24 00.24 MarkupToHTML end
11: 00.24 00.24 MarkupToHTML begin
12: 00.25 00.24 MarkupToHTML end
13: 00.25 00.24 MarkupToHTML begin
14: 00.25 00.25 MarkupToHTML end
15: 00.25 00.25 MarkupToHTML begin
16: 00.25 00.25 MarkupToHTML end
17: 00.25 00.25 MarkupToHTML begin
18: 00.25 00.25 MarkupToHTML end
19: 00.25 00.25 MarkupToHTML begin
20: 00.26 00.25 MarkupToHTML end
21: 00.26 00.25 MarkupToHTML begin
22: 00.26 00.26 MarkupToHTML end
23: 00.27 00.27 MarkupToHTML end
24: 00.27 00.27 MarkupToHTML begin
25: 00.28 00.28 ReadApprovedUrls SiteAdmin.ApprovedUrls begin
26: 00.29 00.28 ReadApprovedUrls SiteAdmin.ApprovedUrls end
27: 00.29 00.29 MarkupToHTML end
28: 00.29 00.29 MarkupToHTML begin
29: 00.30 00.29 MarkupToHTML end
30: 00.30 00.29 now
Peak memory: 3,944,896 bytes