Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
critic markup perl: reject critic markup
while (<STDIN>) {
my $currLine = $_;
#reject deletions:
$currLine =~ s#{--([^\-]+)--}#$1#g;
#reject additions:
$currLine =~ s#{\+\+([^+]*)\+\+}##g;
#reject changes:
$currLine =~ s#{~~([^~]+)~>[^~]+~~}#$1#g;
print $currLine;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.