Skip to content

fix: should use is_inline_element#124

Merged
Moskize91 merged 2 commits intomainfrom
math
Feb 5, 2026
Merged

fix: should use is_inline_element#124
Moskize91 merged 2 commits intomainfrom
math

Conversation

@Moskize91
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Feb 5, 2026

Summary by CodeRabbit

Release Notes

  • Improvements
    • Enhanced whitespace normalization in translated content for cleaner, more consistent output formatting.
    • Improved LaTeX rendering logic with better handling of inline and block content elements in EPUB translations.
    • Refined overall rendering consistency for translated documents.

Walkthrough

The pull request modifies the XML interrupter module to refactor LaTeX rendering logic. Two new imports are added: normalize_whitespace from utils and is_inline_element from xml. The rendering logic for LaTeX is updated to normalize whitespace in the non-None branch and replace an explicit check for DISPLAY_ATTRIBUTE == "inline" with a generalized is_inline_element() function call. This function determines whether to use single dollar signs for inline elements or double dollar signs for block elements as LaTeX delimiters. Existing behavior for the None case is preserved.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning No description was provided; this fails the requirement for the pull request to have a meaningful description related to the changeset. Add a pull request description explaining the changes, rationale, and impact of refactoring the LaTeX rendering logic to use is_inline_element.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format with type 'fix' and subject, and describes the main change (using is_inline_element for LaTeX delimiter logic).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Moskize91 Moskize91 changed the title Math fix: should use is_inline_element Feb 5, 2026
@Moskize91 Moskize91 merged commit f816e3c into main Feb 5, 2026
2 checks passed
@Moskize91 Moskize91 deleted the math branch February 5, 2026 03:03
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.

1 participant