-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop grep fix #198
Develop grep fix #198
Conversation
When I test this by submitting an essay answer with some math (e.g.
I'm not sure |
Ignore the comment I deleted. LaTeX style math strings are not interpolated by As far as I can tell you can't use $1 in a match since it gets bound to character groups from previous matches. In this case you use \1 to match backreferences. http://stackoverflow.com/questions/1068840/what-is-the-difference-between-1-and-1-in-a-perl-regex |
@@ -2032,7 +2032,7 @@ sub EV3P_parser { | |||
my $start = ''; my %end = ('\('=>'\)','\['=>'\]'); | |||
my @parts = split(/(``.*?``\*?|`.+?`\*?|(?:\\[()\[\]]))/s,$string); | |||
foreach my $part (@parts) { | |||
if ($part =~ m/^(``?)(.*)\1(\*?)$/s) { | |||
if ($part =~ m/^(``?)(.*)$1(\*?)$/s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geoff is correct, this should not have been changed. The \1
is used here to make sure the end quotes are the same as the beginning quotes. $1
doesn't work in this situation.
I'm also puzzled as to how the new merges of development into the develop_grep_fix branch seem to have appeared. I think I'll close this pull request also and resubmit it. |
newer versions of perl emit when they see the old style grep strings.