PmSyntaxHighlighting
Test PmSyntax highlighting
See $EnableHighlight
(Not to be confused with $EnablePmSyntax
) and WikiStyles#highlight.
[@ |
<div>Testing <strong>strong</strong>. </div> This is rendered neither as <pre> nor as <code>, so ignored.
|
[@ |
$EnablePmSyntax = 1; // or 2, see below This is rendered neither as <pre> nor as <code>, so ignored.
|
PmWiki markup using "
"
[@(: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:)=]@@ |
(:div:)Testing '''strong'''. (:div:) This is rendered neither as <pre> nor as <code>, so ignored.
|
* $FullName * {$FullName} [@{$FullName}@] @@{$FullName}@@ ''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}=]@@ |
{$FullName} This is rendered neither as <pre> nor as <code>, so ignored.
|
[@[[{$FullName}]]@] @@[[{$FullName}]]@@ ''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}]]=]@@ |
[[{$FullName}]] This is rendered neither as <pre> nor as <code>, so ignored.
|
Using "
"
[@(: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:)=]@@ |
(:div:)Testing '''strong'''. (:div:) This is rendered neither as <pre> nor as <code>, so ignored.
|
[@{$FullName}@] @@{$FullName}@@ ''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}=]@@ |
{$FullName} This is rendered neither as <pre> nor as <code>, so ignored.
|
[@[[{$FullName}]]@] @@[[{$FullName}]]@@ ''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}]]=]@@ |
[[{$FullName}]] This is rendered neither as <pre> nor as <code>, so ignored.
|
-> [@
|
<!--PageFooterFmt-->
<!--PageTitleFmt-->
|
-> [@ | ||||
<!--PageLeftFmt-->
<!--PageLeftFmt-->
<!--PageRightFmt--> (:noright:)
<!--PageFooterFmt-->
<!--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 and
. --Petko
!!! Markup helper functions PSS($x) - strip backslashes (added by the /e option to preg_replace) from $x. [[PmWiki/functions(#PSS)]] PVS($x) - Convert \n\n sequences to <:vspace> PVSE($x) - Convert special characters to HTML entities (excluding quotes) and convert \n\n sequences to <:vspace> PZZ($x,$y='') - return a null string (used for its side effect of evaluating $x and $y) PRR($x=NULL) - indicate that we need to restart markup processing !!! Markup functions CompareArgs($arg) [[CondAuth]]($pagename, $condparm) [[CondExpr | CondExpr($pagename, $condname, $condparm)]] |
Markup helper functions PSS($x) - strip backslashes (added by the /e option to preg_replace) from $x. functions
PVS($x) - Convert \n\n sequences to <:vspace>
PVSE($x) - Convert special characters to HTML entities (excluding quotes) and convert \n\n sequences to <:vspace>
PZZ($x,$y='') - return a null string (used for its side effect of evaluating $x and $y)
PRR($x=NULL) - indicate that we need to restart markup processing
Markup functions CompareArgs($arg)
CondAuth($pagename, $condparm)
CondExpr($pagename, $condname, $condparm)?
|
The links disappear because the whole preformatted block is converted to plain text and sent to Highlight.js for colorization. PmSyntax only restores pre-existing varlinks like $EnableDiag
. It may be better to wrap the individual code lines in @@...@@
, something like this: --Petko
!!! Markup helper functions * @@PSS($x)@@ - strip backslashes (added by the /e option to preg_replace) from $x. [[PmWiki/functions(#PSS)]] * @@PRR($x=NULL)@@ - indicate that we need to restart markup processing !!! Markup functions * @@CompareArgs($arg)@@ * @@CondAuth($pagename, $condparm)@@ - see [[CondAuth]] * @@CondExpr($pagename, $condname, $condparm)@@ |
Markup helper functions
Markup functions |