From 362c300e363cc0fc67897c0c4eca870e0c26a74a Mon Sep 17 00:00:00 2001 From: Paul Buehler Date: Fri, 4 Oct 2024 12:51:34 +0200 Subject: [PATCH] Make sure that the string 'using' in a text is NOT interpreted as the using keyword. (#13546) --- scripts/datamodel-doc/ALICEO2includeFile.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/datamodel-doc/ALICEO2includeFile.py b/scripts/datamodel-doc/ALICEO2includeFile.py index 680beaa684cc1..0d99f6e3aad07 100644 --- a/scripts/datamodel-doc/ALICEO2includeFile.py +++ b/scripts/datamodel-doc/ALICEO2includeFile.py @@ -1078,15 +1078,15 @@ def condition(s): if len(iend) == 0: print(nslevel) sys.exit('Ending ; not found in using declaration! EXIT -->') - cont = words[icol:icol+iend[0]+1] - name = fullDataModelName(nslevel, words[icol+1].txt) + # make sure that using is not part of a text, like ".... PID using TPC ..." or similar definition = O2DMT.block(words[icol+3:icol+iend[0]], False) - - # namespace, name, cont - use = using(nslevel, name, definition, O2DMT.block(cont)) - - usings.append(use) + if ('"' not in definition and "'" not in definition): + # namespace, name, cont + name = fullDataModelName(nslevel, words[icol+1].txt) + cont = words[icol:icol+iend[0]+1] + use = using(nslevel, name, definition, O2DMT.block(cont)) + usings.append(use) return usings