1
0
Fork 0
mirror of https://github.com/awesome-selfhosted/awesome-selfhosted.git synced 2024-11-20 11:27:08 -05:00

Fix regex for mainlink.

This commit is contained in:
Nathan Rew 2020-08-16 11:12:27 +09:00 committed by nodiscc
parent 98e01c9769
commit b0cb23bd92

View file

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