Conversation
- 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 detectedLatest commit: 7e32920 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
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.
Closes #3801
Note
Medium Risk
Touches core SDK
Patternschema 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
Patternmodel by introducingmarkup-start/markup-end/markup-standaloneelements with optionaloptionsandattributes(plus a newAttributetype).Updates plugins to handle the widened pattern union: the
i18nextplugin now imports/exports HTML-like tags (<tag>...</tag>,<tag/>) as markup elements and fails fast whenvariableReferencePatternis['<','>']conflicts with markup; theinlang-message-formatplugin adds full roundtrip parsing/serialization for markup options/attributes (including|...|quoted literals, escaping, and$variableoption values with declaration inference); and theicu1serializer 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.