소스 검색

Fix regex for mainlink.

Nathan Rew 5 년 전
부모
커밋
b0cb23bd92
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tests/test.js

+ 1 - 1
tests/test.js

@@ -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];