source: link include files with dashes and subdirectories
authorMischa POSLAWSKY <perl@shiar.org>
Sun, 23 Apr 2017 01:04:58 +0000 (03:04 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 25 May 2017 20:13:06 +0000 (22:13 +0200)
For example writing-* and digraphs data.

source.plp

index e3b2609..71ed8ce 100644 (file)
@@ -93,7 +93,7 @@ else {
                        my $arg = '';
                        print "<$tag$arg class=\"sy-\l$type\">" if $tag;
                        if (!$type || $type eq 'Constant'
-                       and $contents =~ s{^(['"]?)(/?[a-z0-9_.]+\.(?:plp?|css|js))(?=\1$)}{}) {
+                       and $contents =~ s{^(['"]?)([/a-z0-9_.-]+\.(?:plp?|css|js))(?=\1$)}{}) {
                                # link other page sources, stylesheets, and javascript
                                print $1 . showlink($2, "/source/$2");
                        }