Merge branch 'main' into few-more-archival-script-tweaks
This commit is contained in:
@@ -16,7 +16,7 @@ const files = ['content', 'data'].map(dir => {
|
||||
}).flat()
|
||||
|
||||
// match [foo](/v3) and [bar](/v4) Markdown links
|
||||
const linkRegex = new RegExp('\\(/v[34].*?\\)', 'g')
|
||||
const linkRegex = /\(\/v[34].*?\)/g
|
||||
|
||||
main()
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@ async function main () {
|
||||
function getEntry (matches, regex) {
|
||||
return matches
|
||||
? matches.map(match => {
|
||||
const entry = {}
|
||||
entry.title = cleanPreviewLinks(match.match(regex)[1])
|
||||
entry.changes = getChangedItems(match.match(regex)[2])
|
||||
return entry
|
||||
})
|
||||
const entry = {}
|
||||
entry.title = cleanPreviewLinks(match.match(regex)[1])
|
||||
entry.changes = getChangedItems(match.match(regex)[2])
|
||||
return entry
|
||||
})
|
||||
: []
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ allScripts.forEach(script => {
|
||||
if (startCommentRegex.test(cmt)) addToReadme = true
|
||||
if (endCommentRegex.test(cmt)) addToReadme = false
|
||||
if (addToReadme && !cmt.includes(startComment) && !cmt.includes(endComment)) return cmt
|
||||
return false
|
||||
})
|
||||
// remove comment markers and clean up newlines
|
||||
.map(cmt => cmt.replace(/^(\/\/|#) ?/m, ''))
|
||||
|
||||
Reference in New Issue
Block a user