Skip to content

Commit 7374632

Browse files
committed
split token on colon (:)
Signed-off-by: Alok Kumar <alokkumarjipura9973@gmail.com>
1 parent 8bd04a8 commit 7374632

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/cluecode/copyrights.py

+7-8
Original file line numberDiff line numberDiff line change
@@ -440,13 +440,12 @@ def get_tokens(numbered_lines, splitter=re.compile(r'[\t =;]+').split):
440440
# Split tokens like 'Author:Frankie.Chu' into 'Author' and 'Frankie.Chu'
441441
if tok.startswith("Author:"):
442442
parts = tok.split(":", 1)
443-
if len(parts) == 2:
444-
for part in parts:
445-
part = part.strip()
446-
if part and part not in ':.':
447-
yield Token(value=part, start_line=start_line, pos=pos)
448-
pos += 1
449-
continue
443+
for part in parts:
444+
part = part.strip()
445+
if part and part not in ':.':
446+
yield Token(value=part, start_line=start_line, pos=pos)
447+
pos += 1
448+
continue
450449

451450
# the tokenizer allows a single colon or dot to be a token and we discard these
452451
if tok and tok not in ':.':
@@ -3438,7 +3437,7 @@ def build_detection_from_node(
34383437
# AUTH: {<BY> <NAME>} #2645-3
34393438
34403439
# @author anatol@google.com (Anatol Pomazau)
3441-
AUTHOR: {<AUTH|CONTRIBUTORS|AUTHS>+ <NN>? <COMPANY|NAME|YR-RANGE>* <BY>? <EMAIL>+ <NAME>?} #2650
3440+
AUTHOR: {<AUTH|CONTRIBUTORS|AUTHS>+ <NN>? <COMPANY|NAME|YR-RANGE>* <BY>? <EMAIL>+ <NAME>?} #2650
34423441
34433442
# developed by the National Center for Supercomputing Applications at the University of Illinois at Urbana-Champaign
34443443
AUTHOR: {<AUTH|CONTRIBUTORS|AUTHS>+ <NN>? <COMPANY|NAME|NAME-EMAIL|NAME-YEAR>+ <NN>? <COMPANY|NAME|NAME-EMAIL|NAME-YEAR>+ <YR-RANGE>*} #2660

0 commit comments

Comments
 (0)