Skip to content

fix: count all types of code blocks for explanations - #29749

Merged
colbywhite merged 2 commits into
productionfrom
code.blck.count.fix
Apr 10, 2026
Merged

fix: count all types of code blocks for explanations#29749
colbywhite merged 2 commits into
productionfrom
code.blck.count.fix

Conversation

@colbywhite

Copy link
Copy Markdown
Collaborator

Summary

The previous code block counting logic only accounted for blocks from expressive code. The count would be off for blocks put in via the package manager component or the just natural use of ```.

This logic counts instances of <pre><code>, which results in code fences when converted back into markdown (via Markdown for Agents).

All of this means the code block explain button will explain the appropriate code block.

@github-actions

github-actions Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
*.js @cloudflare/content-engineering, @kodster28
*.ts @cloudflare/content-engineering, @kodster28

@colbywhite
colbywhite force-pushed the code.blck.count.fix branch from 53585d3 to 83311e5 Compare April 10, 2026 18:07
This makes the build output unnecessarily chatty. Just keep on chugging
along.
@github-actions

Copy link
Copy Markdown
Contributor

@colbywhite
colbywhite merged commit 71b5852 into production Apr 10, 2026
13 checks passed
@colbywhite
colbywhite deleted the code.blck.count.fix branch April 10, 2026 18:59
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.

3 participants