Skip to content

preserve tabs in codefences#18638

Merged
SaschaCowley merged 6 commits intomasterfrom
devtabsMd2Html
Aug 8, 2025
Merged

preserve tabs in codefences#18638
SaschaCowley merged 6 commits intomasterfrom
devtabsMd2Html

Conversation

@seanbudd
Copy link
Copy Markdown
Member

@seanbudd seanbudd commented Aug 7, 2025

Link to issue number:

Fixes #18622

Summary of the issue:

Tabs are replaced with spaces in codefences when converting markdown to html.
This causes examples for characterDescriptions, gestures and symbol files to contain incorrect syntax.

Description of user facing changes:

Fixed example in dev guide

Description of developer facing changes:

Description of development approach:

Testing strategy:

Built dev guide, ensured tabs are preserved

Known issues with pull request:

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@coderabbitai summary

Copilot AI review requested due to automatic review settings August 7, 2025 05:19
@seanbudd seanbudd requested a review from a team as a code owner August 7, 2025 05:19
@seanbudd seanbudd requested a review from SaschaCowley August 7, 2025 05:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where tabs were being replaced with spaces in code fences when converting markdown to HTML, which caused incorrect syntax in examples for character descriptions, gestures, and symbol files in the development guide.

  • Added pymdown-extensions library with superfences extension to preserve tabs in code blocks
  • Updated markdown processing to use ordered extensions instead of unordered sets
  • Deprecated the DEFAULT_EXTENSIONS constant with backward compatibility

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
source/md2html.py Updated markdown processing to preserve tabs, added deprecation handling for DEFAULT_EXTENSIONS, and configured pymdownx.superfences
pyproject.toml Updated Markdown version and added pymdown-extensions dependency

seanbudd and others added 3 commits August 7, 2025 15:20
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@seanbudd seanbudd added this to the 2025.3 milestone Aug 7, 2025
Copy link
Copy Markdown
Member

@SaschaCowley SaschaCowley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @seanbudd

@SaschaCowley SaschaCowley merged commit d9fbe81 into master Aug 8, 2025
18 of 22 checks passed
@SaschaCowley SaschaCowley deleted the devtabsMd2Html branch August 8, 2025 01:47
@seanbudd
Copy link
Copy Markdown
Member Author

seanbudd commented Aug 8, 2025

Uh this had failing tests and might need to be reverted

@seanbudd seanbudd mentioned this pull request Aug 8, 2025
seanbudd added a commit that referenced this pull request Aug 8, 2025
Fixup of #18638

#18638 introduced an update to python-markdown, which was not captured in uv.lock.
The uv environment mismatch caused pre-commit checks to fail, including the translation comment check separately.

The latest pypi entry doesn't seem to capture the license correctly, so our license check filtering needed to be updated too
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.

Developer guide: tabs replaced by spaces in code samples

3 participants