Skip to content

Commit

Permalink
Merge pull request #82 from os-autoinst/use_codemirror
Browse files Browse the repository at this point in the history
use codemirror instead of perl::tidy
  • Loading branch information
aplanas committed Nov 29, 2014
2 parents fea5780 + c4c9a5c commit 0b4a68e
Show file tree
Hide file tree
Showing 6 changed files with 9,095 additions and 26 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ testrun-cron
testrun-manual
archive
backlog
perl
video
*.swp
www/htdocs/includes/knownissues.html
Expand Down
24 changes: 0 additions & 24 deletions lib/OpenQA/Helpers.pm
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,6 @@ sub register {
}
);

$app->helper(
syntax_highlight => sub {
my $c=shift;
my $script=shift;
$script=~s{^sub is_applicable}{# this function decides if the test shall run\n$&}m;
$script=~s{^sub run}{# this part contains the steps to run this test\n$&}m;
$script=~s{^sub checklist}{# this part contains known hash values of good or bad results\n$&}m;
eval "require Perl::Tidy;" or return "<pre>$script</pre>";
my @out;
{
local @ARGV;
push(@ARGV,"-html", "-pre", "-css=/dev/null", "-q", "-se");
Perl::Tidy::perltidy(
source => \$script,
destination => \@out,
logfile => "/dev/null",
errorfile => "/dev/null"
);
}
my $out=join("",@out);
return $out;
}
);

# Breadcrumbs generation can be centralized, since it's really simple
$app->helper(
breadcrumbs => sub {
Expand Down

0 comments on commit 0b4a68e

Please sign in to comment.