From 3301a8a999962dee1aa9a6e6c32e3a72e8367f6c Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 23 Apr 2017 03:04:58 +0200 Subject: [PATCH] source: link include files with dashes and subdirectories For example writing-* and digraphs data. --- source.plp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source.plp b/source.plp index e3b2609..71ed8ce 100644 --- a/source.plp +++ b/source.plp @@ -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"); } -- 2.30.0