We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fe322b commit 7bb3c80Copy full SHA for 7bb3c80
.github/workflows/UpdateDirectory.mjs
@@ -59,11 +59,17 @@ function pathsToMarkdown (filePaths) {
59
if (filepath) {
60
++indent
61
}
62
- const urls = [URL_BASE, filepath, filename]
63
- const url = urls.join('/').replace(' ', '%20')
+
+ // prepare the markdown-esque prefix to the file's line
64
+ const prefix = pathPrefix(indent)
65
66
// remove extension from filename
- filename = filename.split('.')[0]
- output.push(`${pathPrefix(indent)} [${filename}](${url})`)
67
+ const name = filename.split('.')[0]
68
69
+ // create URL to the actual file on github
70
+ const url = encodeURI([URL_BASE, filepath, filename].join('/'))
71
72
+ output.push(`${prefix} [${name}](${url})`)
73
74
75
return output.join('\n')
0 commit comments