Changeset 5502


Ignore:
Timestamp:
11/12/09 18:36:27 (2 years ago)
Author:
MichaelTempest
Message:

Item2352: Use Foswiki's regex instead of a hard-coded regex, so that WysiwygPlugin will always "see" macros in the same way as Foswiki's renderer.

Location:
branches/Release01x00/WysiwygPlugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x00/WysiwygPlugin/lib/Foswiki/Plugins/WysiwygPlugin/TML2HTML.pm

    r5308 r5502  
    197197            if ( $token eq '%' && $stackTop =~ /}$/ ) { 
    198198                while ( scalar(@stack) 
    199                     && $stackTop !~ /^\n?%([A-Z0-9_:]+){.*}$/os ) 
     199                    && $stackTop !~ /^\n?%($Foswiki::regex{tagNameRegex}){.*}$/os ) 
    200200                { 
    201201                    $stackTop = pop(@stack) . $stackTop; 
     
    203203            } 
    204204            if (   $token eq '%' 
    205                 && $stackTop =~ m/^(\n?)%([A-Z0-9_:]+)({.*})?$/os ) 
     205                && $stackTop =~ m/^(\n?)%($Foswiki::regex{tagNameRegex})({.*})?$/os ) 
    206206            { 
    207207                my $nl = $1; 
  • branches/Release01x00/WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm

    r5375 r5502  
    13151315        tml  => "fred *%WIKINAME%* fred", 
    13161316        html => "<p>fred <b>$protecton%WIKINAME%$protectoff</b> fred</p>", 
     1317    }, 
     1318    { 
     1319        exec => $TML2HTML | $ROUNDTRIP, 
     1320        name => 'Item2352', 
     1321        tml  => '%Foo%', 
     1322        html => "<p>" . $protecton . '%Foo%' . $protectoff . "</p>" 
    13171323    }, 
    13181324    { 
Note: See TracChangeset for help on using the changeset viewer.