Skip to content

Commit

Permalink
Fix regex for mainlink.
Browse files Browse the repository at this point in the history
  • Loading branch information
n8225 authored and nodiscc committed Sep 5, 2020
1 parent 98e01c9 commit b0cb23b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function parseLicense(md) {

//Test '- [Name](http://homepage/)'
function testMainLink(text) {
let testA = /(^ {0,2}- \[.*?\]\(.*\))(?=.?-? ?\w)/;
let testA = /(^ {0,2}- \[.*?\]\([^)]*\.[^)]*?\))(?=\ ?\-?\ ?\w)/ // /(^ {0,2}- \[.*?\]\(.*\))(?=.?-? ?\w)/;
const testA1 = /(- \W?\w*\W{0,2}.*?\)?)( .*$)/;
if (!testA.test(text)) {
let a1 = testA1.exec(text)[2];
Expand Down

0 comments on commit b0cb23b

Please sign in to comment.