{{ message }}
Repository navigation
fix(muya): restore inline HTML tag marker style and hide bare <br/> markers - #5636
Merged
Merged
Conversation
Jocs
force-pushed
the
fix/inline-html-tag-marker
branch
from
October 6, 2026 12:39
44fa307 to
4d6b2b2
Compare
…arkers The @muyajs/core rewrite emitted span.mu-html-tag for the literal inline HTML tag markers but never carried the legacy span.ag-html-tag rule over, so the markers inherited the body colour and font and the highlighting vanished (#5635). The <br> renderer also wrapped its literal marker text together with the real <br> element in an unconditional span.mu-html-tag, so the tag text stayed visible in WYSIWYG mode even when the caret was elsewhere (#5634 / #1878). The marker now follows the same cursor-conflict resolution as every other inline HTML tag: it collapses under .mu-hide while the caret is outside the token, while the <br> stays in the flow so the line break keeps working. Restore the legacy rule and add a jsdom spec for the <br> marker plus e2e coverage for the computed marker style and the collapsed <br/> marker.
Jocs
force-pushed
the
fix/inline-html-tag-marker
branch
from
October 6, 2026 12:50
4d6b2b2 to
4c99550
Compare
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.

Closes #5635
Closes #5634
Closes #1878
Summary
After the desktop renderer moved to
@muyajs/core, the engine emitsspan.mu-html-tagfor the literal inline HTML tag markers (<u>,</u>,<br/>, …) but no matching.mu-html-tagrule was carried over from the legacy engine. The markers therefore inherited the paragraph colour and font and the syntax highlighting disappeared. This restores the legacyspan.ag-html-tagrule.It also fixes the
<br>marker, which was rendered unconditionally: a void tag never resolved the cursor conflict, so its literal<br/>text stayed visible in WYSIWYG mode even when the caret was elsewhere. It now collapses under.mu-hideonce the caret leaves the token, and is only shown while the caret sits inside<br>— the behaviour requested in #1878.Type of change
Test plan
packages/muya/src/inlineRenderer/__tests__/htmlTagMarker.spec.ts— jsdom spec: the<br/>marker collapses under.mu-hidewhile the real<br>stays in the flow, and is revealed again once the caret enters the token.packages/muya/e2e/tests/blocks/html-inline.spec.ts— e2e assertions for the computed marker style (--editor-color-50, monospace, weight 200) and the collapsed<br/>marker.Commands run:
pnpm -C packages/muya test— 2361 passedpnpm -C packages/muya lint:types/lint/lint:css— clean (only pre-existing complexity warnings)blocks/html-inlineplustyping/table,editing/cross-block-enter,editing/table-cell-selection,editing/table-rect-clipboard,editing/cut-into-table-5400,editing/table-last-cell-delete-5386— all passNotes for reviewers [optional]
<br>change keeps the rendered<br>element in the flow and collapses only the literal marker text, so the line break keeps working (verified visually).<br>token, consistent with every other inline HTML tag — which is the behaviour settled on in WYSIWYG error on line breaks in raw HTML #1878.By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.