Merge pull request #1394 from Tibsfox/fix/issue-triage-batch-1392-1391-1389

fix: trailing slash, slug newlines, and duplicate command registration
This commit is contained in:
Tom Boucher
2026-04-01 12:12:37 -04:00
committed by GitHub
8 changed files with 24 additions and 74 deletions

View File

@@ -16,7 +16,8 @@ function cmdGenerateSlug(text, raw) {
const slug = text
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-+|-+$/g, '');
.replace(/^-+|-+$/g, '')
.substring(0, 60);
const result = { slug };
output(result, raw, slug);

View File

@@ -1061,7 +1061,7 @@ function pathExistsInternal(cwd, targetPath) {
function generateSlugInternal(text) {
if (!text) return null;
return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '');
return text.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-+|-+$/g, '').substring(0, 60);
}
function getMilestoneInfo(cwd) {