From 886826ee7b8fbd770e5fe3262bf65482a244e69d Mon Sep 17 00:00:00 2001
From: Jan Frenzel <jan.frenzel@tu-dresden.de>
Date: Thu, 24 Feb 2022 16:18:50 +0100
Subject: [PATCH] Improved pattern in check-templated-code-snippets.py to
 reduce number of wrong matches.

---
 doc.zih.tu-dresden.de/util/check-templated-code-snippets.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc.zih.tu-dresden.de/util/check-templated-code-snippets.py b/doc.zih.tu-dresden.de/util/check-templated-code-snippets.py
index 14470ed78..51829691c 100755
--- a/doc.zih.tu-dresden.de/util/check-templated-code-snippets.py
+++ b/doc.zih.tu-dresden.de/util/check-templated-code-snippets.py
@@ -12,7 +12,8 @@ lines = []
 NORMAL_MODE = 0
 CODE_MODE = 1
 readMode = NORMAL_MODE
-pattern = re.compile(r"<[^<>']*>")
+#We need to avoid matches for "#include <iostream>", "<Ctrl+D>", "<-" (typically in R) and "<594>" (VampirServer)
+pattern = re.compile(r"(?<!#include )<(?!Ctrl\+)[^0-9 -][^<>']*>")
 with open(fileName) as f:
     lineNumber = 1
     for line in f:
-- 
GitLab