Skip to content

Commit b597273

Browse files
committed
Fixed #352 Handle "special" character in license_expression
* `+` and `(` and `)` are now removed from the `not_support_char` Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 9d0a635 commit b597273

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* The UrlField is now only taking single URL value
88
* The owner is now a StringField instead of ListField
99
* Format the ordering of the genreated ABOUT file (See https://github.com/nexB/aboutcode-toolkit/issues/349#issuecomment-438871444)
10+
* '+' and '(' and ')' is now supported in license_expression
1011

1112
2018-10-23
1213

src/attributecode/model.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,9 +1548,8 @@ def parse_license_expression(lic_expression):
15481548

15491549
def special_char_in_license_expresion(lic_expression):
15501550
not_support_char = [
1551-
'!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
1552-
'+', '=', '{', '}', '|', '[', ']', '\\',
1553-
':', ';', '<', '>', '?', ',', '/']
1551+
'!', '@', '#', '$', '%', '^', '&', '*', '=', '{', '}',
1552+
'|', '[', ']', '\\', ':', ';', '<', '>', '?', ',', '/']
15541553
special_character = []
15551554
for char in not_support_char:
15561555
if char in lic_expression:

0 commit comments

Comments
 (0)