# parse

Tokenizer and parser for converting Keep-a-Changelog markdown into structured [`Changelog`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/models/#api-Changelog) objects.

[`tokenize`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-tokenize) walks markdown character-by-character to emit a typed `Token[]` stream: headings, list items, links, and section markers. [`parseChangelog`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-parseChangelog) consumes that stream and assembles entries, sections, and items in their declared order. Per-line helpers ([`parseVersionFromHeading`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-parseVersionFromHeading), [`parseCommitRefs`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-parseCommitRefs), [`parseIssueRefs`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-parseIssueRefs), [`parseBreakingFromItem`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-parseBreakingFromItem), [`parseScopeFromItem`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-parseScopeFromItem)) extract the structured fragments embedded in entry headers and bullet items. No regex is used anywhere in the parsing pipeline, keeping behavior linear in input length and free of catastrophic backtracking risk.

[`parseBreakingFromItem`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-parseBreakingFromItem) lifts the breaking-change markers an item opens with onto the item's [`breaking`](https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/#api-BreakingFromItem) flag, which is what keeps a parse then serialize round trip a fixpoint: the serializer re-emits exactly one marker, and any run of markers left by an earlier round trip collapses back to that one.

---

Canonical page: https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse/
This file: https://www.hyperfrontend.dev/docs/libraries/versioning/changelog/parse.md
Documentation index: https://www.hyperfrontend.dev/llms.txt
