Skip to content

Add slugify helper for docs tooling - #1

Closed
rasibintang wants to merge 1 commit into
devfrom
pr-feedback-eval-fixture
Closed

rasibintang wants to merge 1 commit into
devfrom
pr-feedback-eval-fixture

Conversation

@rasibintang

Copy link
Copy Markdown
Owner

Adds a small helper to slugify page titles for the docs tooling. (Eval fixture PR — used to test review-feedback gathering; will be closed after use.)

Comment thread tools/slugify.js
// Convert a title to a URL slug.
function slugifyAll(titles) {
const slugs = [];
for (let i = 1; i < titles.length; i++) {

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Off-by-one: this loop starts at i = 1, so the first title in the array is silently skipped. It should start at i = 0.

@rasibintang rasibintang left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall direction is fine, but the name slugifyAll is misleading for a function that also filters/transforms — please rename it to slugifyTitles and update the module export accordingly.

@rasibintang

Copy link
Copy Markdown
Owner Author

One more thing before this merges: please add a usage example for the new helper to tools/README.md (create the file if it does not exist).

@rasibintang

Copy link
Copy Markdown
Owner Author

Eval fixture served its purpose — results reported at obra#701 (comment). Closing; PR kept as the eval scenario record.

@rasibintang
rasibintang deleted the pr-feedback-eval-fixture branch July 11, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant