- print "<$tag$arg class=\"sy-\l$_->[0]\">" if $tag;
- if (!$_->[0] || $_->[0] eq 'Constant'
- and $_->[1] =~ s{^(['"]?)(/?[a-z0-9_.]+\.(?:plp?|css|js))(?=\1$)}{}) {
- printf '%s<a href="%s">%s</a>', $1, "/source/$2", $2;
+ print "<$tag$arg class=\"sy-\l$type\">" if $tag;
+ if (!$type || $type eq 'Constant'
+ and $contents =~ s{^(['"]?)($incname)(?=\1$)}{}) {
+ # link other page sources, stylesheets, and javascript
+ print $1 . showlink($2, "/source/$2");
+ }
+ if (!$type and $contents =~ s/^(\s*)([A-Z]\w+(?:::\w+)+)(?![^;\s])//) {
+ # link perl module names (Xx::Xx...)
+ print $1 . showlink($2, "/source/$2");