docs: preserve tab labels and code language tags in agent-facing .md files#2528
Open
birosrichard wants to merge 2 commits into
Open
docs: preserve tab labels and code language tags in agent-facing .md files#2528birosrichard wants to merge 2 commits into
birosrichard wants to merge 2 commits into
Conversation
…iles Adds two rehype plugins to the signalwire llms-txt pipeline that run before HTML→markdown conversion: - rehypeExpandTabs: expands Docusaurus <Tabs> into sequential labeled sections so all tab variants (e.g. JS and Python) are visible with their labels, instead of being dropped or merged into unlabeled blocks - rehypeFixCodeLanguage: copies the language-* class from Prism's <pre> to its child <code> so rehype-remark can detect the language and emit correct fenced code blocks (e.g. ```javascript instead of bare ```) Fixes #2459, #1884 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
✅ Preview for this PR (commit |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
webrdaniel
approved these changes
May 13, 2026
|
|
||
| const { visit, SKIP } = require('unist-util-visit'); | ||
| const { selectAll } = require('hast-util-select'); | ||
| const { toString } = require('hast-util-to-string'); |
Contributor
There was a problem hiding this comment.
Should these be added to package.json?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes: #1884
closes: #2529
Adds two rehype plugins to the signalwire llms-txt pipeline that run before HTML→markdown conversion:
<pre>to its child<code>so rehype-remark can detect the language and emit correct fenced code blocks (e.g.javascript instead of bare)cc: @TC-MO
Testable here: https://pr-2528.preview.docs.apify.com/platform/proxy.md