Skip to content

fix(links): allow inline code within links#8318

Open
mejo- wants to merge 1 commit intomainfrom
fix/code_in_link
Open

fix(links): allow inline code within links#8318
mejo- wants to merge 1 commit intomainfrom
fix/code_in_link

Conversation

@mejo-
Copy link
Member

@mejo- mejo- commented Mar 8, 2026

The Tiptap inline code mark extension excludes all other mark types from coexisting with itself. This makes sense for most mark types, but link is an exception.

Unfortunately there's no way to dynamically create a list of all marks when excludes is initialized, as this happens when compiling the editor schema, so the latter is not available yet.

Thus to fix the bug while keeping the side effects small, we have to explicitely list all mark types except link and code in excludes in the code mark definition.

Fixes: #4900

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

The Tiptap inline code mark extension excludes all other mark types from
coexisting with itself. This makes sense for most mark types, but link
is an exception.

Unfortunately there's no way to dynamically create a list of all marks
when `excludes` is initialized, as this happens when compiling the
editor schema, so the latter is not available yet.

Thus to fix the bug while keeping the side effects small, we have to
explicitely list all mark types except link and code in `excludes` in
the code mark definition.

Fixes: #4900

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- self-assigned this Mar 8, 2026
@mejo- mejo- requested a review from max-nextcloud as a code owner March 8, 2026 22:25
@mejo- mejo- added the bug Something isn't working label Mar 8, 2026
@mejo- mejo- requested a review from silverkszlo as a code owner March 8, 2026 22:25
@mejo- mejo- added feature: formatting Features related to text formatting and node types 3. to review format: markdown labels Mar 8, 2026
@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review bug Something isn't working feature: formatting Features related to text formatting and node types format: markdown

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Links removed on text formatted as inline code

1 participant