[PR #7961] fix: fix Latex BuildException #8239

Open
opened 2026-03-23 23:23:15 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7961
Author: @M-T-Arden
Created: 5/21/2025
Status: 🔄 Open

Base: mainHead: fix#7949


📝 Commits (4)

  • dc2ca48 fix: fix #7949 Latex Build Exception
  • a69cfb8 fix: fix #7949 Latex BuildException
  • c2f13dd fix: fix Latex Building Exception
  • cf21ba7 fix: adjust formula alignment to left after fixing BuildException

📊 Changes

1 file changed (+17 additions, -1 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/math_equation/math_equation_block_component.dart (+17 -1)

📄 Description

PR Checklist

Summary by Sourcery

Bug Fixes:

  • Fixes a BuildException that occurs when importing LaTeX equations containing raw \\ line breaks from external sources (e.g., Notion). This fix introduces a preprocessing step that wraps such input in an aligned environment, preventing CrNode exceptions without modifying the math rendering library.
  • Related to #7949

Summary by Sourcery

Prevent BuildException when rendering LaTeX equations containing raw '\' by wrapping them in an 'aligned' environment using a new preprocessing step.

Bug Fixes:

  • Prevent BuildException when importing LaTeX formulas with raw '\' line breaks by wrapping them in an 'aligned' environment if not already wrapped.

Enhancements:

  • Introduce a _safeLatex preprocessing function to wrap raw line breaks in an aligned environment before rendering.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/7961 **Author:** [@M-T-Arden](https://github.com/M-T-Arden) **Created:** 5/21/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix#7949` --- ### 📝 Commits (4) - [`dc2ca48`](https://github.com/AppFlowy-IO/AppFlowy/commit/dc2ca4855197400ef9ca40798271f970a96068aa) fix: fix #7949 Latex Build Exception - [`a69cfb8`](https://github.com/AppFlowy-IO/AppFlowy/commit/a69cfb8b71a764692dfccd2e7547b057238df4bd) fix: fix #7949 Latex BuildException - [`c2f13dd`](https://github.com/AppFlowy-IO/AppFlowy/commit/c2f13dde7d97d0e70170a33cef31904ad52c3c0f) fix: fix Latex Building Exception - [`cf21ba7`](https://github.com/AppFlowy-IO/AppFlowy/commit/cf21ba7f9425b8db737bbdb6c527de643bc708c7) fix: adjust formula alignment to left after fixing BuildException ### 📊 Changes **1 file changed** (+17 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/math_equation/math_equation_block_component.dart` (+17 -1) </details> ### 📄 Description #### PR Checklist - [x] My code adheres to [[AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions)](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [ ] All existing tests are passing. ### Summary by Sourcery Bug Fixes: - Fixes a `BuildException` that occurs when importing LaTeX equations containing raw `\\` line breaks from external sources (e.g., Notion). This fix introduces a preprocessing step that wraps such input in an `aligned` environment, preventing `CrNode` exceptions without modifying the math rendering library. - Related to #7949 ## Summary by Sourcery Prevent BuildException when rendering LaTeX equations containing raw '\\' by wrapping them in an 'aligned' environment using a new preprocessing step. Bug Fixes: - Prevent BuildException when importing LaTeX formulas with raw '\\' line breaks by wrapping them in an 'aligned' environment if not already wrapped. Enhancements: - Introduce a _safeLatex preprocessing function to wrap raw line breaks in an aligned environment before rendering. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#8239
No description provided.