Skip to content

add markup support #4325

Merged
samuelstroschein merged 3 commits intomainfrom
markup
Feb 10, 2026
Merged

add markup support #4325
samuelstroschein merged 3 commits intomainfrom
markup

Conversation

@samuelstroschein
Copy link
Member

@samuelstroschein samuelstroschein commented Feb 9, 2026

Closes #3801

Note

Medium Risk
Touches core SDK Pattern schema and multiple serializers/parsers, so regressions could affect import/export compatibility across formats. Changes are additive with explicit errors for unsupported/conflicting syntax, which limits silent failures.

Overview
Adds first-class markup placeholders to the SDK Pattern model by introducing markup-start/markup-end/markup-standalone elements with optional options and attributes (plus a new Attribute type).

Updates plugins to handle the widened pattern union: the i18next plugin now imports/exports HTML-like tags (<tag>...</tag>, <tag/>) as markup elements and fails fast when variableReferencePattern is ['<','>'] conflicts with markup; the inlang-message-format plugin adds full roundtrip parsing/serialization for markup options/attributes (including |...| quoted literals, escaping, and $variable option values with declaration inference); and the icu1 serializer explicitly throws a user-facing error when markup is encountered. Docs and tests are expanded to cover these new rich-text cases and failure modes.

Written by Cursor Bugbot for commit 6defee0. This will update automatically on new commits. Configure here.

- Added markup-aware import and export support to the i18next plugin, including rich text tag syntax and error handling for conflicting variable reference patterns.
- Extended the SDK pattern AST with richer markup metadata, supporting markup options and attributes.
- Improved markup support in the inlang message format plugin, including roundtrip support for markup options and attributes, quoted literal values, and validation for malformed placeholders.
- Updated ICU1 serializer to handle markup elements explicitly and provide user-facing errors for unsupported markup placeholders.
- Enhanced documentation to include details on markup placeholders, options, attributes, and escaping special characters.
- Added tests for handling markup placeholders, mixed expressions, options, attributes, and error scenarios in both message format and SDK.
@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2026

🦋 Changeset detected

Latest commit: 7e32920

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@inlang/plugin-i18next Minor
@inlang/sdk Minor
@inlang/plugin-message-format Minor
@inlang/plugin-icu1 Patch
@inlang/cli Patch
@inlang/plugin-m-function-matcher Patch
@inlang/plugin-t-function-matcher Patch
@inlang/rpc Patch
@inlang/editor-component Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6defee03e7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@samuelstroschein samuelstroschein merged commit 3bbc513 into main Feb 10, 2026
2 of 3 checks passed
@samuelstroschein samuelstroschein deleted the markup branch February 10, 2026 18:54
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] markup placeholders (html, rich text, components)

1 participant