We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dd8ee7 commit a875194Copy full SHA for a875194
lib/EvalbotExecuter.pm
@@ -85,6 +85,14 @@ sub run {
85
my $page = `curl -s $program`;
86
$page =~ /href="\/raw([^"]+)"/;
87
if ($1) { $program = decode_utf8 `curl -s https://raw.github.com/gist$1` } else { return 'gist not found' };
88
+ } elsif ($program =~ /^https:\/\/github\.com\/([^\/]+\/[^\/]+)\/blob\/([^\/]+\/[^\/].*)$/) {
89
+ my ($project, $file) = ($1, $2);
90
+ my $page = `curl -s $program`;
91
+ if ($page =~ /href="\/$project\/raw\/$file"/) {
92
+ $program = decode_utf8 `curl -s https://raw.github.com/$project/$file`
93
+ } else {
94
+ return 'file not found'
95
+ };
96
}
97
my $response = _fork_and_eval($program, $executer, $ename);
98
if (!length $response){
0 commit comments