IBM / license-scanner

License Scanner
Apache License 2.0
6 stars 3 forks source link

Issue 21 #22

Closed markstur closed 2 years ago

markstur commented 2 years ago
Support for markdown prefixes and comment blocks

Hashtag header prefixes of 1-6 hashes causes problems with our current normalizer which only takes the first
hash and can cause mismatches between input license and template matching. Instead of only taking the first #
as a typical line comment, we can now take up to ###### as a comment/markdown prefix consistently.

** In addition the copyleft-next and perhaps others use blocks like this. **

The same regex handles these asterisks, but currently only takes 1. Now it also will take 1-6.

So whether it is markdown or a comment prefix/suffix, this modification allows the normalizer to remove 1-6
leading hashtags and 1-6 leading or trailing asterisks.