Fix Encode Inputs doc page rendering (closes #1909)#2061
Open
LeSingh1 wants to merge 1 commit into
Open
Conversation
The three section anchors used `[[[[anchor]]]]` (four brackets) instead of the `[[anchor]]` syntax expected by the HF doc-builder. As a result, the published page at https://huggingface.co/docs/tokenizers/main/en/api/encode-inputs renders the literal `[[[[tokenizers.TextEncodeInput]]]]` markup and the intra-page `#tokenizers.*` anchors that EncodeInput links to are broken. This patch normalizes the three anchors to the same `[[anchor]]` form used everywhere else in `docs/source-doc-builder/api/` (e.g. `input-sequences.mdx`).
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.
Summary
The three section anchors in
docs/source-doc-builder/api/encode-inputs.mdxused[[[[anchor]]]](four brackets) instead of the[[anchor]]syntax expected by the HF doc-builder. As a result:[[[[tokenizers.TextEncodeInput]]]]markup instead of generating a section anchor.#tokenizers.TextEncodeInput/#tokenizers.PreTokenizedEncodeInputanchors that the EncodeInput section links to never get emitted, so the in-page jump links are broken.Fix
Normalize the three anchors to the same
[[anchor]]form used everywhere else indocs/source-doc-builder/api/— seeinput-sequences.mdxfor the established pattern.(Same change applied to
PreTokenizedEncodeInputandEncodeInput.)Verification
grep -rn "\\[\\[\\[\\[" docs/source-doc-builder/returns no remaining matches after the patch.docs/source-doc-builder/api/input-sequences.mdx, which already uses[[tokenizers.InputSequence]]and renders correctly in production docs.doc-builder previewlocally; the diff is a self-contained markdown anchor fix.Issue
Closes #1909