aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test.js
diff options
context:
space:
mode:
authornodiscc <nodiscc@gmail.com>2020-09-05 13:05:15 +0000
committerGitHub <noreply@github.com>2020-09-05 13:05:15 +0000
commit40ab55a72de23cb8f1066efe55cf77c5c63d3bf1 (patch)
tree6c5cdc689ac17741f91146d0f2ee3fee2199911d /tests/test.js
parentMerge pull request #2202 from awesome-selfhosted/fix-checks (diff)
parenttravis.yml: only run full awesome_bot tests on monthly-check branch (diff)
downloadawesome-selfhosted-40ab55a72de23cb8f1066efe55cf77c5c63d3bf1.tar.gz
awesome-selfhosted-40ab55a72de23cb8f1066efe55cf77c5c63d3bf1.zip
Merge pull request #2199 from awesome-selfhosted/travis_test
Travis test
Diffstat (limited to 'tests/test.js')
-rw-r--r--tests/test.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test.js b/tests/test.js
index 9d2ef63c..36ee3e4e 100644
--- a/tests/test.js
+++ b/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];
@@ -81,9 +81,9 @@ function testDescription(text) {
//If present, tests '([Demo](http://url.to/demo), [Source Code](http://url.of/source/code), [Clients](https://url.to/list/of/related/clients-or-apps))'
function testSrcDemCli(text) {
- let testC = text.search(/\(\[|\)\,|\)\)/);
+ let testC = text.search(/\.\ \(|\.\ \[|\ \(\[[sSdDcC]/); // /\(\[|\)\,|\)\)/);
let testD = /(?<=\w. )(\(\[(Demo|Source Code|Clients)\]\([^)\]]*\)(, \[(Source Code|Clients)\]\([^)\]]*\))?(, \[(Source Code|Clients)\]\([^)\]]*\))*\))(?= \`?)/;
- const testD1 = /(^- \W[a-zA-Z0-9-_ ]*\W{0,2}http[^\[]*)(?<= )/;
+ const testD1 = /(^- \W[a-zA-Z0-9-_ .]*\W{0,2}http[^\[]*)(?<= )/;
const testD2 = /(\`.*\` \`.*\`$)/;
if ((testC > -1) && (!testD.test(text))) {
let d1 = testD1.exec(text)[1];