Spdx-Java-Library icon indicating copy to clipboard operation
Spdx-Java-Library copied to clipboard

Templates with <<var... tags in a string without spaces does not match correctly

Open goneall opened this issue 5 years ago • 1 comments

Since the license matching is tokanized and the var tags assume the regular expression is a token, it likely will not match a string in the middle of an expression.

It will also match when the template has an incorrect space (see LicenseListXML issue https://github.com/spdx/license-list-XML/issues/1146).

goneall avatar Nov 23 '20 16:11 goneall

This turns out to be a very challenging fix - we need access to the alt tag spacing hints which are not preserved in the template.

There are two approaches I can think of:

  • Move to a regular expression approach used by yalm
  • Use the original license XML files for doing the matching rather than using the intermediate template files

Once Yalm passes all of the tests and we have some basic performance comparisons, I plan to look into the first approach.

goneall avatar Aug 26 '21 18:08 goneall