Browse Source

add comment about case 4

Hiroki Aihara 1 week ago
parent
commit
5a1173b7c4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/remark-lsx/src/client/services/renderer/lsx.ts

+ 2 - 0
packages/remark-lsx/src/client/services/renderer/lsx.ts

@@ -64,6 +64,8 @@ export const remarkPlugin: Plugin = () => (tree) => {
             firstAttrValue === '' &&
             firstAttrValue === '' &&
             !SUPPORTED_ATTRIBUTES.includes(firstAttrKey)
             !SUPPORTED_ATTRIBUTES.includes(firstAttrKey)
           ) {
           ) {
+            // Consecutive bare attributes are joined with spaces to restore the prefix path,
+            // because the micromark parser splits space-separated words into separate attributes.
             const prefixParts: string[] = [];
             const prefixParts: string[] = [];
             for (const [key, value] of attrEntries) {
             for (const [key, value] of attrEntries) {
               if (value !== '' || SUPPORTED_ATTRIBUTES.includes(key)) {
               if (value !== '' || SUPPORTED_ATTRIBUTES.includes(key)) {