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:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user