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 e3b2609b92f12362b4adce28497ef22d77008c42..71ed8cecf15c46c50d1399d6ae052dbc757cd9eb 100644 (file)
@@ -93,7 +93,7 @@ else {
                        my $arg = '';
                        print "<$tag$arg class=\"sy-\l$type\">" if $tag;
                        if (!$type || $type eq 'Constant'
                        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");
                        }
                                # link other page sources, stylesheets, and javascript
                                print $1 . showlink($2, "/source/$2");
                        }