Created
October 25, 2013 10:20
-
-
Save neelsmith/7152548 to your computer and use it in GitHub Desktop.
critic markup perl: accept markup in stdin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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