Skip to content

Fix Encode Inputs doc page rendering (closes #1909)#2061

Open
LeSingh1 wants to merge 1 commit into
huggingface:mainfrom
LeSingh1:docs/fix-encode-inputs-rendering
Open

Fix Encode Inputs doc page rendering (closes #1909)#2061
LeSingh1 wants to merge 1 commit into
huggingface:mainfrom
LeSingh1:docs/fix-encode-inputs-rendering

Conversation

@LeSingh1
Copy link
Copy Markdown

Summary

The three section anchors in docs/source-doc-builder/api/encode-inputs.mdx 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 instead of generating a section anchor.
  • The #tokenizers.TextEncodeInput / #tokenizers.PreTokenizedEncodeInput anchors 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 in docs/source-doc-builder/api/ — see input-sequences.mdx for the established pattern.

-## TextEncodeInput[[[[tokenizers.TextEncodeInput]]]]
+## TextEncodeInput[[tokenizers.TextEncodeInput]]

(Same change applied to PreTokenizedEncodeInput and EncodeInput.)

Verification

  • grep -rn "\\[\\[\\[\\[" docs/source-doc-builder/ returns no remaining matches after the patch.
  • Side-by-side compare with docs/source-doc-builder/api/input-sequences.mdx, which already uses [[tokenizers.InputSequence]] and renders correctly in production docs.
  • I did not run the full doc-builder preview locally; the diff is a self-contained markdown anchor fix.

Issue

Closes #1909

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`).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Encode Inputs rendering issues

1 participant