From 7e8d3c8d1fab3ede1b2ce0e469475dc992576ffd Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 12 Oct 2009 22:18:20 +0000 Subject: [PATCH] source: link stylesheet/js references --- source.plp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source.plp b/source.plp index 1f3c600..7ae3bdb 100644 --- a/source.plp +++ b/source.plp @@ -61,7 +61,8 @@ foreach (@$parsed) { my $tag = $_->[0] && ($TYPETAG{ $_->[0] } || 'span'); my $arg = ''; print "<$tag$arg class=\"sy-\l$_->[0]\">" if $tag; - if ($_->[0] eq 'Constant' and $_->[1] =~ s/^(')([a-z0-9_.]+\.plp?)(?=\1$)//) { + if ($_->[0] eq 'Constant' + and $_->[1] =~ s{^(['"])(/?[a-z0-9_.]+\.(?:plp?|css|js))(?=\1$)}{}) { printf '%s%s', $1, "/source/$2", $2; } if (!$_->[0] and $_->[1] =~ s/^(\s*)([A-Z]\w+(?:::\w+)+)(?![^;\s])//) { -- 2.30.0