@ -8,7 +8,7 @@ let issuelog = ' "message": "#### Syntax Issues\\n\\n Name | Entry\\n----|-----
constfile=fs.readFileSync(process.argv[2],'utf8');// Reads argv into var file
functionentryFilter(md){// Function to find lines with entries
constlinepatt=/^ {0,4}\* \[.*`/;
constlinepatt=/^\s{0,2}-\s\[.*`/;
returnlinepatt.test(md);
}
@ -17,14 +17,14 @@ function split(text) { // Function to split lines into array
}
functionfindPattern(text){// Test entries against 8 patterns. If matches pattern returns true
constnodnospatt=/^ {0,4}\* \[.*?\]\(.*?\) - .{0,249}?\. `.*?` `.*?`/;// Regex for entries with no demo and no source code
constslpatt=/^ {0,4}\* \[.*?\]\(.*?\) - .{0,249}?\. \(\[Demo\b\]\(.*?\), \[Source Code\b\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with demo and source code
constnodpatt=/ {0,4}\* \[.*?\]\(.*?\) - .{0,249}?\. \(\[Source Code\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with no demo
constnospatt=/ {0,4}\* \[.*?\]\(.*?\) - .{0,249}?\. \(\[Demo\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with no source code
constpnodnospatt=/ {0,4}\* \[.*?\]\(.*?\) `⚠` - .{0,249}?\. `.*?` `.*?`/;// Regex for entries with proprietary with no demo and no source code
constpslpatt=/ {0,4}\* \[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Demo\b\]\(.*?\), \[Source Code\b\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with demo and source code
constpnodpatt=/ {0,4}\* \[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Source Code\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with no demo
constpnospatt=/ {0,4}\* \[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Demo\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with no source code
constnodnospatt=/^-\s{0,2}\s\[.*?\]\(.*?\) - .{0,249}?\. `.*?` `.*?`/;// Regex for entries with no demo and no source code
constslpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) - .{0,249}?\. \(\[Demo\b\]\(.*?\), \[Source Code\b\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with demo and source code
constnodpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) - .{0,249}?\. \(\[Source Code\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with no demo
constnospatt=/^\s{0,2}-\s\[.*?\]\(.*?\) - .{0,249}?\. \(\[Demo\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with no source code
constpnodnospatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. `.*?` `.*?`/;// Regex for entries with proprietary with no demo and no source code
constpslpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Demo\b\]\(.*?\), \[Source Code\b\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with demo and source code
constpnodpatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Source Code\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with no demo
constpnospatt=/^\s{0,2}-\s\[.*?\]\(.*?\) `⚠` - .{0,249}?\. \(\[Demo\]\(.*?\)\) `.*?` `.*?`/;// Regex for entries with proprietary with no source code
if(nodnospatt.test(text)===true){
returntrue;
}elseif(slpatt.test(text)===true){
@ -46,7 +46,7 @@ function findPattern(text) { // Test entries against 8 patterns. If matches pat
}
functionentryErrorCheck(md){
constnamepatt=/\* \[(.*?)\]/;// regex pattern to find name of entryArray
constnamepatt=/^\s{0,2}-\s\[(.*?)\]/;// regex pattern to find name of entryArray
constentries=split(md);// Inserts each line into the entries array