From: Mischa POSLAWSKY Date: Mon, 12 Oct 2009 22:18:20 +0000 (+0000) Subject: source: link stylesheet/js references X-Git-Tag: v1.3~121 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/7e8d3c8d1fab3ede1b2ce0e469475dc992576ffd source: link stylesheet/js references --- 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])//) {