Skip to content

FOLLOW-UP: Share slugifyHeading between auto_tasks.go and markdown.go (from PR #145) #148

@adnaan

Description

@adnaan

Context

This follow-up task was identified during the review of PR #145.

Source PR: #145
PR Title: feat: auto-interactive markdown checkboxes
Suggested by: @claude-bot
Priority: Low

Task Description

Currently there are two independent slug functions:

  • slugifyHeading() in auto_tasks.go (root package)
  • slugify() in internal/source/markdown.go

Both convert heading text to URL-safe anchors (GitHub-style), and they must produce identical output for anchor matching to work. Currently this is documented with a comment warning, but there's no enforcement.

Options:

  1. Extract to a shared internal package (e.g., internal/slug)
  2. Add a test that compares both implementations against a test matrix
  3. Have one call the other via import

Original Comment

The comment warns about keeping this in sync, but there's no enforcement. Consider extracting to a shared package, adding a test that compares both implementations, or using the same function via import.


This issue was automatically created by prmonitor from PR review comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowLow: extended features, operational docsfollow-upFollow-up task from PR reviewfrom-reviewIssue originated from PR review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions