Fix: restore www. in broken links

This commit is contained in:
Arthur McLain
2025-02-10 01:04:47 +01:00
parent e48a71aecb
commit a1df2e5c8b
2 changed files with 16 additions and 16 deletions

View File

@@ -50,7 +50,7 @@ function format(file = "README.md") {
const updatedData = data
.split('\n')
.map(line => {
// line = line.replace(/https:\/\/www\./g, 'https://'); // removes www.
// line = line.replace(/https:\/\/www\./g, 'https://'); // removes www. (DON'T USE! Some links break!)
line = line.replace(/\((https?:\/\/.*?)\/\)/g, "($1)"); // removes trailing /
// if (line.startsWith('- [')) {
// const parts = line.split(' - ');