File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,15 +74,15 @@ var re = out.default;
7474
7575``` text
7676/(?:[*!#] |)@license Apache\-2\.0
77- (?:[*!#] |)
77+ (?:[*!#]|)
7878(?:[*!#] |)Copyright \(c\) [0-9]{1,4} .+\.
79- (?:[*!#] |)
79+ (?:[*!#]|)
8080(?:[*!#] |)Licensed under the Apache License, Version 2\.0 \(the "License"\);
8181(?:[*!#] |)you may not use this file except in compliance with the License\.
8282(?:[*!#] |)You may obtain a copy of the License at
83- (?:[*!#] |)
83+ (?:[*!#]|)
8484(?:[*!#] |) http:\/\/www\.apache\.org\/licenses\/LICENSE\-2\.0
85- (?:[*!#] |)
85+ (?:[*!#]|)
8686(?:[*!#] |)Unless required by applicable law or agreed to in writing, software
8787(?:[*!#] |)distributed under the License is distributed on an "AS IS" BASIS,
8888(?:[*!#] |)WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
Original file line number Diff line number Diff line change @@ -125,7 +125,10 @@ function createTable( license, types ) {
125125
126126 // If "default", insert a regular expression capture group to account for variation in leading characters for each line:
127127 if ( v === 'default' ) {
128- h = '(?:[*!#] |)' + replace ( h , '\n' , '\n(?:[*!#] |)' ) ;
128+ h = replace ( h , '\n\n' , '{{TMP}}\n' ) ;
129+ h = replace ( h , '\n' , '\n(?:[*!#] |)' ) ;
130+ h = replace ( h , '{{TMP}}' , '\n(?:[*!#]|)' ) ;
131+ h = '(?:[*!#] |)' + h ;
129132 }
130133 // Replace placeholder values:
131134 h = replace ( h , '\\{\\{YEAR\\}\\}' , '[0-9]{1,4}' ) ; // 0-9999
You can’t perform that action at this time.
0 commit comments