Skip to content

fix: preserve API order for docs anchors instead of sorting alphabetically#151

Merged
angeloashmore merged 1 commit intomainfrom
fix/preserve-anchor-order
Apr 18, 2026
Merged

fix: preserve API order for docs anchors instead of sorting alphabetically#151
angeloashmore merged 1 commit intomainfrom
fix/preserve-anchor-order

Conversation

@angeloashmore
Copy link
Copy Markdown
Member

@angeloashmore angeloashmore commented Apr 18, 2026

Resolves: #144

Description

Removes the alphabetical sort on docs anchors so they appear in the order returned by the API, matching the structure of the underlying document.

Checklist

  • A comprehensive Linear ticket, providing sufficient context and details to facilitate the review of the PR, is linked to the PR.
  • If my changes require tests, I added them.
  • If my changes affect backward compatibility, it has been discussed.
  • If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA 1

Run prismic docs list fields/content-relationship and verify anchors appear in document order rather than alphabetical order.


Note

Low Risk
Low risk: this only removes a client-side sort so anchor output order matches the API response; no API calls, parsing, or error handling behavior changes.

Overview
Updates prismic docs list <path> to stop alphabetically sorting entry.anchors by slug, so anchors are printed in the same order returned by the docs API (i.e., document order).

Reviewed by Cursor Bugbot for commit 23cab8f. Bugbot is set up for automated code reviews on this repo. Configure here.

Footnotes

  1. Please use these labels when submitting a review:
    ❓ #ask: Ask a question.
    💡 #idea: Suggest an idea.
    ⚠️ #issue: Strongly suggest a change.
    🎉 #nice: Share a compliment.

…cally

Resolves #144

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@angeloashmore angeloashmore merged commit 494e82d into main Apr 18, 2026
13 checks passed
@angeloashmore angeloashmore deleted the fix/preserve-anchor-order branch April 18, 2026 01:18
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.

Don't sort docs anchors alphabetically

1 participant