diff options
author | Aditya Mangalampalli <aditya.mangalampalli@gmail.com> | 2022-04-15 02:00:25 -0700 |
---|---|---|
committer | Vijay A <vraravam@users.noreply.github.com> | 2022-04-16 21:57:57 +0530 |
commit | 210131ca184c3aa043371857c022aa1aa149efbf (patch) | |
tree | 6bc4e10a1540e55a66146c099bc468a12287425e /scripts/link-readme.ts | |
parent | Update submodule url to ferdium-recipes (#1) (diff) | |
download | ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.tar.gz ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.tar.zst ferdium-app-210131ca184c3aa043371857c022aa1aa149efbf.zip |
Matched casing for almost all replacements
Diffstat (limited to 'scripts/link-readme.ts')
-rw-r--r-- | scripts/link-readme.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/link-readme.ts b/scripts/link-readme.ts index 77b384ff4..bf1e9fcb6 100644 --- a/scripts/link-readme.ts +++ b/scripts/link-readme.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | /** | 1 | /** |
2 | * Script that automatically creates links to issues and users inside README.md | 2 | * Script that automatically creates links to issues and users inside README.md |
3 | * | 3 | * |
4 | * e.g. "#123" => "[#123](https://github.com/getferdi/ferdi/issues/123)" | 4 | * e.g. "#123" => "[#123](https://github.com/ferdium/ferdium-app/issues/123)" |
5 | * and "franz/#123" => "[franz#123](https://github.com/meetfranz/franz/issues/123)" | 5 | * and "franz/#123" => "[franz#123](https://github.com/meetfranz/franz/issues/123)" |
6 | * and "@abc" => "[@abc](https://github.com/abc)" | 6 | * and "@abc" => "[@abc](https://github.com/abc)" |
7 | */ | 7 | */ |
@@ -38,14 +38,14 @@ readme = readme.replace(/(?<!\[)\w+\/\w+#\d+(?![\d\]])/gi, match => { | |||
38 | return `[${repo}#${issueNr}](https://github.com/${repo}/issues/${issueNr})`; | 38 | return `[${repo}#${issueNr}](https://github.com/${repo}/issues/${issueNr})`; |
39 | }); | 39 | }); |
40 | 40 | ||
41 | // Replace Ferdi issues | 41 | // Replace Ferdium issues |
42 | // Regex matches strings that don't begin with a "[", i.e. are not already linked and | 42 | // Regex matches strings that don't begin with a "[", i.e. are not already linked and |
43 | // don't begin with "franz", i.e. are not Franz issues, followed by a "#" and digits to indicate | 43 | // don't begin with "franz", i.e. are not Franz issues, followed by a "#" and digits to indicate |
44 | // a GitHub issue, and not ending with a "]" | 44 | // a GitHub issue, and not ending with a "]" |
45 | readme = readme.replace(/(?<!\[|franz)#\d+(?![\d\]])/gi, match => { | 45 | readme = readme.replace(/(?<!\[|franz)#\d+(?![\d\]])/gi, match => { |
46 | const issueNr = match.replace('#', ''); | 46 | const issueNr = match.replace('#', ''); |
47 | replacements += 1; | 47 | replacements += 1; |
48 | return `[#${issueNr}](https://github.com/getferdi/ferdi/issues/${issueNr})`; | 48 | return `[#${issueNr}](https://github.com/ferdium/ferdium-app/issues/${issueNr})`; |
49 | }); | 49 | }); |
50 | 50 | ||
51 | // Link GitHub users | 51 | // Link GitHub users |