[PATCH 1/5] Makefile: Fix typo in CREFPTN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From ad129055142dfaa6a816d541c767c1cd86c0cf73 Mon Sep 17 00:00:00 2001
From: Akira Yokosawa <akiyks@xxxxxxxxx>
Date: Mon, 27 Jul 2020 16:10:26 +0900
Subject: [PATCH 1/5] Makefile: Fix typo in CREFPTN

This regular expression is supposed to catch a pattern of
\cref{ref:a} {ref:b}, which will result in something like:

    Section 1.2 ref:b ...

Due to a typo in the expression, it catches

    ... { ... \cref{ref:a} ... } { ... }

, which is a false positive.

Fixing the pattern to "[^}]+}" will avoid the false positive.

Fixes: 962cbb73ce0c ("Makefile: Add check of \crefrange and \clnrefrange misuse")
Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 802d638e..4e2b65ab 100644
--- a/Makefile
+++ b/Makefile
@@ -135,7 +135,7 @@ LINEREF_ENV_END     := $(shell grep -l -F '\end{lineref}'     $(LATEXSOURCES))
 LINELABEL_ENV := $(sort $(LINELABEL_ENV_BEGIN) $(LINELABEL_ENV_END))
 LINEREF_ENV   := $(sort $(LINEREF_ENV_BEGIN) $(LINEREF_ENV_END))
 
-CREFPTN    := '\\[Cc](ln)?ref{[^{]+}\s*{[^}]+}'
+CREFPTN    := '\\[Cc](ln)?ref{[^}]+}\s*{[^}]+}'
 CREFPAIR   := $(shell grep -l -zo -E $(CREFPTN)   $(LATEXSOURCES))
 
 SOURCES_OF_SNIPPET_ALL := $(shell grep -r -l -F '\begin{snippet}' CodeSamples)
-- 
2.17.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux