From ac0550ed606e950b54779d5ffcbf646721421ce4 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 11 Jan 2020 13:49:01 +0000 Subject: [PATCH] tests/filter/extract-doctests: Recognise directives first We are going to expand the rules for => expansions and they would match directives too, but we don't want them to. No functional change with existing input. Signed-off-by: Ian Jackson --- tests/filter/extract-doctests | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/filter/extract-doctests b/tests/filter/extract-doctests index e4141e6..d16aa6c 100755 --- a/tests/filter/extract-doctests +++ b/tests/filter/extract-doctests @@ -45,9 +45,9 @@ while (<>) { next unless m{\=\>} or ($cent and m{ \.\. }); my $mapop = '=>'; # adhoc: special case NEWQUOTE here so we recognise things in changequote - if (s{^(\s*)(\&\S+|NEWQUOTE\S+|\$)\s+(\=\>|\.\.)\s+(\S+)\s+}{} || - s{^()(\&\:\w+(?: \S+)*)\s{2,}(\=\>)\s{2,}($withspcs)$}{} || - $cent && s{^()($withspcs)\s{2,}(\.\.)\s{2,}($withspcs)$}{}) { + if (s{^()(\&\:\w+(?: \S+)*)\s{2,}(\=\>)\s{2,}($withspcs)$}{} || + s{^(\s*)(\&\S+|NEWQUOTE\S+|\$)\s+(\=\>|\.\.)\s+(\S+)\s+}{} || + $cent && s{^()($withspcs)\s{2,}(\.\.)\s{2,}($withspcs)$}{}) { # adhoc: expected indented iff in changequote part confess if length($1) xor $in_changequote; $mapop = $3; -- 2.30.2