瀏覽代碼

Update regex checks for Source Code, Demo, Clients

Nathan Rew 5 年之前
父節點
當前提交
98e01c9769
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/test.js

+ 1 - 1
tests/test.js

@@ -81,7 +81,7 @@ 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 testD2 = /(\`.*\` \`.*\`$)/;