Skip to content

Commit f5c0a03

Browse files
authored
Merge pull request #47 from JakkuSakura/fix-title
fix title string concatenation with comma issue
2 parents c19c1a8 + 9ccacf2 commit f5c0a03

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,14 @@ function renderTags(tags: Array<TagDescription>) {
243243
}"`
244244
)
245245
.join("");
246-
const children = tag.props.children;
246+
247+
let children = tag.props.children;
248+
249+
if (Array.isArray(children)) {
250+
// in JavaScript, strings are concatenated with comma which is not what we want
251+
// we should join them manually instead
252+
children = children.join("");
253+
}
247254
if (tag.setting?.close) {
248255
return `<${tag.tag} data-sm="${tag.id}"${props}>${
249256
// @ts-expect-error

0 commit comments

Comments
 (0)