Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Move svg-for-file() into Pod::Htmlify
  • Loading branch information
Paul Cochrane committed May 4, 2015
1 parent 15dc4a1 commit 2f987de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions htmlify.p6
Expand Up @@ -100,14 +100,6 @@ sub recursive-dir($dir) {
}
}

#| Return the SVG for the given file, without its XML header
sub svg-for-file($file) {
my $handle = open $file;
my $str = join "\n", grep { /^'<svg'/ ff False }, $handle.lines;
$handle.close;
$str;
}

# --sparse=5: only process 1/5th of the files
# mostly useful for performance optimizations, profiling etc.
sub MAIN(
Expand Down
8 changes: 8 additions & 0 deletions lib/Pod/Htmlify.pm6
Expand Up @@ -28,4 +28,12 @@ sub footer-html($pod-path) is export {
return $footer;
}

#| Return the SVG for the given file, without its XML header
sub svg-for-file($file) is export {
my $handle = open $file;
my $str = join "\n", grep { /^'<svg'/ ff False }, $handle.lines;
$handle.close;
$str;
}

# vim: expandtab shiftwidth=4 ft=perl6

0 comments on commit 2f987de

Please sign in to comment.