diff --git a/src/utils/parser/constants.mjs b/src/utils/parser/constants.mjs index 9f79c0b7..95301c8d 100644 --- a/src/utils/parser/constants.mjs +++ b/src/utils/parser/constants.mjs @@ -5,9 +5,7 @@ export const DOC_API_SLUGS_REPLACEMENTS = [ { from: /node.js/i, to: 'nodejs' }, // Replace Node.js { from: /&/, to: '-and-' }, // Replace & { from: /[/_,:;\\ ]/g, to: '-' }, // Replace /_,:;\. and whitespace - { from: /--+/g, to: '-' }, // Replace multiple hyphens with single - { from: /^-/, to: '' }, // Remove any leading hyphen - { from: /-$/, to: '' }, // Remove any trailing hyphen + { from: /^-(?!$|-)|(?