Skip to content

Commit ba3cc0c

Browse files
authored
Merge pull request #40 from shiftleftcyber/ai-findings-autofix
Potential fixes for 2 code quality findings
2 parents be8020f + 8635e19 commit ba3cc0c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

marketing/scripts/import-linkedin-post.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function validateArgs(args) {
8888
}
8989

9090
if (!/^https:\/\/(www\.)?linkedin\.com\//.test(args.url)) {
91-
throw new Error("--url must be a LinkedIn URL beginning with https://www.linkedin.com/");
91+
throw new Error("--url must be a LinkedIn URL beginning with https://www.linkedin.com/ or https://linkedin.com/");
9292
}
9393

9494
if (!/^\d{4}-\d{2}-\d{2}$/.test(args.date)) {
@@ -140,7 +140,7 @@ function normalizeText(value) {
140140
}
141141

142142
function linkifyBareUrls(line) {
143-
return line.replace(/(^|[\s(])((https?:\/\/)[^\s<>()\]]+[^\s<>().,\];:'"!?])/g, (match, prefix, url) => {
143+
return line.replace(/(^|[\s(])((https?:\/\/)[^\s<>()\]]+[^\s<>().,;\]:'"!?])/g, (match, prefix, url) => {
144144
const beforeUrl = line.slice(0, line.indexOf(match) + prefix.length);
145145

146146
if (beforeUrl.endsWith("](") || beforeUrl.endsWith('"') || beforeUrl.endsWith("'")) {

0 commit comments

Comments
 (0)