Skip to content

Commit

Permalink
Item9783: Fixed bug where a variable name that contained a string ope…
Browse files Browse the repository at this point in the history
…ration command resulted in a syntax error

git-svn-id: http://svn.foswiki.org/trunk/FreeMarkerPlugin@9475 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
ArthurClemens authored and ArthurClemens committed Oct 2, 2010
1 parent 23d9df0 commit e02983a
Show file tree
Hide file tree
Showing 5 changed files with 1,316 additions and 1,271 deletions.
3 changes: 2 additions & 1 deletion data/System/FreeMarkerPlugin.txt
Expand Up @@ -367,7 +367,8 @@ One line description, required for extensions repository catalog.
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change&nbsp;History: | <!-- versions below in reverse order -->&nbsp; |
| 12 May 2010 (1.0) | First release |
| 03 Oct 2010 | 1.0.1: Fixed bug where a variable name that contained a string operation command resulted in a syntax error. |
| 12 May 2010 | 1.0.0: First release |
| Home: | http://foswiki.org/Extensions/%TOPIC% |
| Support: | http://foswiki.org/Support/%TOPIC% |

Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/FreeMarkerPlugin.pm
Expand Up @@ -9,7 +9,7 @@ use Foswiki::Plugins::FreeMarkerPlugin::AttributeParser qw(new parse);
use Foswiki::Plugins::FreeMarkerPlugin::FreeMarkerParser qw(new parse);

our $VERSION = '$Rev: 4533 $';
our $RELEASE = '1.0';
our $RELEASE = '1.0.1';
our $SHORTDESCRIPTION = '<nop>FreeMarker template parser';
our $NO_PREFS_IN_TOPIC = 1;
our $pluginName = 'FreeMarkerPlugin';
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/FreeMarkerPlugin/FreeMarkerGrammar.yp
Expand Up @@ -1384,7 +1384,7 @@ s/^\b(sort_by|sort|size|seq_index_of|seq_contains|reverse|last|join|first)\b\s*/
# string operations
return ( $1, $1 )
if (
s/^(word_list|upper_case|uncap_first|substring|string|replace|lower_case|length|xhtml|html|eval|capitalize|cap_first)\s*//
s/^\b(word_list|upper_case|uncap_first|substring|string|replace|lower_case|length|xhtml|html|eval|capitalize|cap_first)\b\s*//
);

# sequence operations
Expand Down
2 changes: 1 addition & 1 deletion lib/Foswiki/Plugins/FreeMarkerPlugin/FreeMarkerParser.pm
Expand Up @@ -4875,7 +4875,7 @@ s/^\b(sort_by|sort|size|seq_index_of|seq_contains|reverse|last|join|first)\b\s*/
# string operations
return ( $1, $1 )
if (
s/^(word_list|upper_case|uncap_first|substring|string|replace|lower_case|length|xhtml|html|eval|capitalize|cap_first)\s*//
s/^\b(word_list|upper_case|uncap_first|substring|string|replace|lower_case|length|xhtml|html|eval|capitalize|cap_first)\b\s*//
);

# sequence operations
Expand Down

0 comments on commit e02983a

Please sign in to comment.