Skip to content

Commit daeaf95

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3dd9ab3 commit daeaf95

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

plugins/repo-data-plugin.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,16 @@ module.exports = function (context, options) {
7878
* "talon_mgba_http" -> ["talon", "mgba", "http"]
7979
*/
8080
function splitRepoName(name) {
81-
return name
82-
// Insert boundary before uppercase runs: "VoiceLauncher" -> "Voice Launcher"
83-
.replace(/([a-z])([A-Z])/g, "$1 $2")
84-
// Split acronym from next word: "HTTPServer" -> "HTTP Server"
85-
.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2")
86-
.split(/[-_.\s]+/)
87-
.map((w) => w.toLowerCase())
88-
.filter((w) => w.length > 2);
81+
return (
82+
name
83+
// Insert boundary before uppercase runs: "VoiceLauncher" -> "Voice Launcher"
84+
.replace(/([a-z])([A-Z])/g, "$1 $2")
85+
// Split acronym from next word: "HTTPServer" -> "HTTP Server"
86+
.replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2")
87+
.split(/[-_.\s]+/)
88+
.map((w) => w.toLowerCase())
89+
.filter((w) => w.length > 2)
90+
);
8991
}
9092

9193
/**
@@ -101,7 +103,11 @@ module.exports = function (context, options) {
101103
);
102104
for (const word of words) {
103105
const canonical = tagAliases[word] || word;
104-
if (canonicalTags.has(canonical) && !existingCanonical.has(canonical) && !implicitTags.includes(canonical)) {
106+
if (
107+
canonicalTags.has(canonical) &&
108+
!existingCanonical.has(canonical) &&
109+
!implicitTags.includes(canonical)
110+
) {
105111
repo.topics.push(word);
106112
existingCanonical.add(canonical);
107113
}

src/components/RepoExplorer/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ const CardTags: React.FC<CardTagsProps> = ({
8686
</button>
8787
))}
8888
{tags.length > maxTags && (
89-
<span className={moreClass}>
90-
+{tags.length - maxTags} more
91-
</span>
89+
<span className={moreClass}>+{tags.length - maxTags} more</span>
9290
)}
9391
</div>
9492
);

0 commit comments

Comments
 (0)