Skip to content

fix: keep content before the next heading when slicing tokens - #223

Merged
dsanders11 merged 1 commit into
mainfrom
fix/content-slicing
Oct 28, 2026
Merged

dsanders11 merged 1 commit into
mainfrom
fix/content-slicing

Conversation

@dsanders11

Copy link
Copy Markdown
Member

findContentAfterList and findContentAfterHeadingClose computed the end index relative to a slice but used it as an absolute index, dropping the token before the next heading (often a code fence) or emptying the description entirely for structures and events.

Claude did an analysis and says this is currently causing some of our docs content to be truncated when parsing the docs, mostly trailing code fences.

findContentAfterList and findContentAfterHeadingClose computed the end
index relative to a slice but used it as an absolute index, dropping the
token before the next heading (often a code fence) or emptying the
description entirely for structures and events.

Assisted-by: Claude Fable 5.1
@dsanders11
dsanders11 requested a review from a team as a code owner October 27, 2026 21:09
Comment thread src/markdown-helpers.ts Resolved
@dsanders11
dsanders11 merged commit 55c9e7e into main Oct 28, 2026
11 checks passed
@dsanders11
dsanders11 deleted the fix/content-slicing branch October 28, 2026 17:18
@electron-npm-package-publisher

Copy link
Copy Markdown

🎉 This PR is included in version 3.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants