Skip to content

Commit 526d995

Browse files
committed
fix: pseudotranslator for self closing tags
1 parent a72a6fe commit 526d995

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • cmp/compiler/src/translators/pseudotranslator

cmp/compiler/src/translators/pseudotranslator/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function pseudolocalize(text: string): string {
113113
// Regular expression to match patterns we should NOT translate:
114114
// - Variable placeholders: {varName}
115115
// - Component tags: <tagName> or </tagName>
116-
const preserveRegex = /(\{\w+}|<\/?\w+>)/g;
116+
const preserveRegex = /(\{\w+}|<\/?\w+\/?>)/g;
117117

118118
// Split text into parts that should be preserved and parts that should be translated
119119
const parts: Array<{ text: string; preserve: boolean }> = [];

0 commit comments

Comments
 (0)