Fix LaTeX not being properly recognized#1137
Open
carla-at-wiris wants to merge 5 commits intorelease/v8.15.2from
Open
Fix LaTeX not being properly recognized#1137carla-at-wiris wants to merge 5 commits intorelease/v8.15.2from
carla-at-wiris wants to merge 5 commits intorelease/v8.15.2from
Conversation
jgonzalez-at-wiris
approved these changes
Feb 12, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes LaTeX detection when multiple $$...$$ blocks appear on the same line by selecting the LaTeX block associated with the caret position.
Changes:
- Updates LaTeX boundary detection to target the LaTeX extracted at the caret.
- Simplifies caret-in-LaTeX detection to rely on LaTeX extraction logic.
- Enhances LaTeX extraction to locate the
$$...$$block that contains the caret offset.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
xjiang-at-wiris
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When having multiple LaTeX on the same line, it was always recognizing the first one. This PR fixed that behavior by finding the LaTeX within the caret position, if any.
How should be tested? (Manual or Automated Tests)
Start and build the CKEditor 5 demo. Validate that multiple LaTeX in the same line are properly recognized when trying to edit them.
To avoid having to build the project, go to the staging demo for this branch and CKEditor 5: https://integrations.wiris.kitchen/fix/latex-recognition-multiple/html/ckeditor5/