chiark / gitweb /
doctests: Allow parenthetical comments as an expansion RHS
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 29 Dec 2019 14:18:49 +0000 (14:18 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 30 Dec 2019 11:35:16 +0000 (11:35 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/filter/extract-doctests

index 707da89..4357bee 100755 (executable)
@@ -55,7 +55,7 @@ while (<>) {
            s{^or (\S+)$}{}) {
            $e->{OutTop} = $1 eq 'nothing' ? '' : $1;
        } elsif (# parse: expect other wordish things to be comments
-                m{^(?!or\b)\w{2,} }) {
+                m{^(?!or\b)\(?\w{2,} }) {
        } elsif (# adhoc: slightly special case for $(eval $(call
                 m{^\$\{.*}) {
            $e->{Out} .= ' '.$&;