Skip to content

Fix docs syntax highlighting in admonition code blocks#10346

Merged
nopcoder merged 3 commits intomasterfrom
fix/docs-remove-conflicting-codehilite
Apr 8, 2026
Merged

Fix docs syntax highlighting in admonition code blocks#10346
nopcoder merged 3 commits intomasterfrom
fix/docs-remove-conflicting-codehilite

Conversation

@nopcoder
Copy link
Copy Markdown
Contributor

@nopcoder nopcoder commented Apr 8, 2026

Summary

  • Remove conflicting codehilite extension from mkdocs.yml — it was intercepting code blocks before pymdownx.highlight/pymdownx.superfences could handle them, preventing syntax highlighting inside admonitions (e.g. "Example: lakeFS with Pandas" on the landing page)
  • Upgrade pymdown-extensions from 10.20.1 to 10.21.2 to fix a filename=None crash with Pygments 2.20+ (facelessuser/pymdown-extensions#2864)

Related Issue

Closes #10347

Test plan

  • mkdocs build passes locally with pymdownx 10.21.2 + Pygments 2.20.0
  • "Example: lakeFS with Pandas" code block renders with Python syntax highlighting
  • All other code blocks render correctly

Remove conflicting codehilite extension that was preventing
pymdownx.highlight + pymdownx.superfences from properly syntax
highlighting code blocks nested inside admonitions.
@nopcoder nopcoder added exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached mostly-ai labels Apr 8, 2026
@nopcoder nopcoder self-assigned this Apr 8, 2026
@github-actions github-actions Bot added the docs Improvements or additions to documentation label Apr 8, 2026
Pygments 2.20.0 added html.escape() on the filename parameter in
HtmlFormatter but doesn't handle None values. pymdownx.highlight
passes filename=None when auto_title is disabled, causing a crash.
This surfaced after removing the conflicting codehilite extension.
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 8, 2026

📚 Documentation preview at https://pr-10346.docs-lakefs-preview.io/

(Updated: 4/8/2026, 9:34:13 PM - Commit: e26766c)

pymdown-extensions 10.21.2 fixes the filename=None crash with
Pygments 2.20+ (facelessuser/pymdown-extensions#2864), so no need
to pin Pygments to an older version.
@nopcoder nopcoder requested a review from a team April 8, 2026 18:37
@nopcoder nopcoder merged commit 2d29175 into master Apr 8, 2026
62 checks passed
@nopcoder nopcoder deleted the fix/docs-remove-conflicting-codehilite branch April 8, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docs Improvements or additions to documentation exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached mostly-ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Python code blocks lack syntax highlighting inside admonitions

2 participants