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> This is rendered neither as <pre> nor as <code>, so ignored.
|
%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 This is rendered neither as <pre> nor as <code>, so ignored.
|
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:) This is rendered neither as <pre> nor as <code>, so ignored.
|
* $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} This is rendered neither as <pre> nor as <code>, so ignored.
|
%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}]] This is rendered neither as <pre> nor as <code>, so ignored.
|
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:) This is rendered neither as <pre> nor as <code>, so ignored.
|
%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} This is rendered neither as <pre> nor as <code>, so ignored.
|
%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}]] This is rendered neither as <pre> nor as <code>, so ignored.
|
>>pre<< -> %hlt html%[@<!--PageFooterFmt-->@]@@ @@%pmhlt%@@[=(:nofooter:)=]@@ -> %hlt html%[@<!--PageTitleFmt-->@]@@ @@%pmhlt%@@[=(:notitle:)=]@@ >><< |
<!--PageFooterFmt--> (:nofooter:)
<!--PageTitleFmt--> (:notitle:)
|
-> %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:)
|
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