소스 검색

allow spaces in attribute names

Hiroki Aihara 1 주 전
부모
커밋
268c0eeeb2

+ 0 - 1
packages/remark-growi-directive/src/micromark-extension-growi-directive/lib/factory-attributes.js

@@ -111,7 +111,6 @@ export function factoryAttributes(
       code !== codes.greaterThan &&
       code !== codes.graveAccent &&
       code !== codes.rightParenthesis &&
-      code !== codes.space &&
       code !== codes.comma
     ) {
       effects.consume(code);

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

@@ -63,7 +63,7 @@ export const remarkPlugin: Plugin = () => (tree) => {
             firstAttrValue === '' &&
             !SUPPORTED_ATTRIBUTES.includes(firstAttrKey)
           ) {
-            attributes.prefix = firstAttrKey;
+            attributes.prefix = firstAttrKey.trim();
           }
         }
       }