Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
critic markup perl: accept markup in stdin
while (<STDIN>) {
my $currLine = $_;
# accept deletions:
$currLine =~ s#{--[^\-]+--}##g;
# accept additions:
$currLine =~ s#{\+\+([^+]*)\+\+}#$1#g;
# accept changes:
$currLine =~ s#{~~[^~]+~>([^~]+)~~}#$1#;
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.