From: dpvc v. a. <we...@ma...> - 2010-03-13 02:05:54
|
Log Message: ----------- Fixed a problem with the signed number pattern that cause Real("4*3") to produce 4 rather than 12. Modified Files: -------------- pg/macros: contextFraction.pl Revision Data ------------- Index: contextFraction.pl =================================================================== RCS file: /webwork/cvs/system/pg/macros/contextFraction.pl,v retrieving revision 1.11 retrieving revision 1.12 diff -Lmacros/contextFraction.pl -Lmacros/contextFraction.pl -u -r1.11 -r1.12 --- macros/contextFraction.pl +++ macros/contextFraction.pl @@ -218,7 +218,7 @@ sub Init { my $context = $main::context{Fraction} = Parser::Context->getCopy("Numeric"); $context->{name} = "Fraction"; - $context->{pattern}{signedNumber} .= '|-?\d+/\d+'; + $context->{pattern}{signedNumber} = '(?:'.$context->{pattern}{signedNumber}.'|-?\d+/-?\d+)'; $context->operators->set( "/" => {class => "context::Fraction::BOP::divide"}, "//" => {class => "context::Fraction::BOP::divide"}, |