spdx / tools

SPDX Tools
Apache License 2.0
126 stars 69 forks source link

Var text following optional text fails matching #119

Open goneall opened 6 years ago

goneall commented 6 years ago

If a license template has the following form:

some text that doesn't affect the outcome <<beginOptional>>some optional text <<beginOption>>make this complext<<endOptional>><<endOptional>> <<var name="something"; original="orig";match=".+">> more text

it will fail since the match template parser will look for the more text without considering possible variable text.

This issue will not occur if there is no nested optional or var elements nested inside the optional.