Skip to content
Snippets Groups Projects
Commit 886826ee authored by Jan Frenzel's avatar Jan Frenzel
Browse files

Improved pattern in check-templated-code-snippets.py to reduce number of

wrong matches.
parent c9469e11
No related branches found
No related tags found
2 merge requests!530Automated merge from preview to main,!495Decreased number of mistakes in template check.
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment