NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item2225: SyntaxHighlightingPlugin ignores macro escape

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Normal Confirmed Extension SyntaxHighlightingPlugin Main.AndrewJones
The SyntaxHighlightingPlugin ignores any MACRO escape. Neither ! nor ! work. This is particularly frustrating for highlighting simple scripts that use the date command.

For example, the following;
%CODE{"perl"}%
#!/bin/perl -w

use strict;
use Getopt::Long;

my $date = `date "+!%Y%m%d_%H:%M:%S"`;
%ENDCODE%

Still tries to replace the %Y% with the image of a tick; %CODE{"perl"}% #!/bin/perl -w

use strict; use Getopt::Long;

my $date = `date "+!DONEm%d_%H:%M:%S"`; %ENDCODE%


Yep, can confirm the problem. Unfortunately its not an easy fix...

I will keep looking at it and let you know when its fixed.

-- AndrewJones - 15 Oct 2009

Another problem with this bug is that some people use %INCLUDE% inside %CODE%, which still needs to get expanded.

No closer finding a good fix for this frown

-- AndrewJones - 17 Oct 2009

ItemTemplate edit

Summary SyntaxHighlightingPlugin ignores macro escape
ReportedBy SallyHoughton
Codebase 1.0.5
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Extension
Component SyntaxHighlightingPlugin
Priority Normal
CurrentState Confirmed
WaitingFor AndrewJones
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r4 - 06 Jan 2010, AndrewJones
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads