Skip to content

Commit ac14f6f

Browse files
committed
Make &svg-for-file 7x faster
1 parent acb47f9 commit ac14f6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Pod/Htmlify.pm6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ sub footer-html($pod-path) is export {
113113

114114
#| Return the SVG for the given file, without its XML header
115115
sub svg-for-file($file) is export {
116-
join "\n", grep { /^'<svg'/ ff False }, $file.IO.lines;
116+
.substr: .index: '<svg' given $file.IO.slurp;
117117
}
118118

119119
# vim: expandtab shiftwidth=4 ft=perl6

0 commit comments

Comments
 (0)