diff --git a/plugins/remark-snackplayer/src/index.ts b/plugins/remark-snackplayer/src/index.ts index ac404875cf5..aa0e917a58d 100644 --- a/plugins/remark-snackplayer/src/index.ts +++ b/plugins/remark-snackplayer/src/index.ts @@ -33,11 +33,9 @@ async function toJsxNode(node: Code) { const params = parseParams(node.meta ?? undefined); // Gather necessary Params - const name = params.name ? decodeURIComponent(params.name) : 'Example'; - const description = params.description - ? decodeURIComponent(params.description) - : 'Example usage'; - const ext = params.ext ? decodeURIComponent(params.ext) : 'tsx'; + const name = params.name || 'Example'; + const description = params.description || 'Example usage'; + const ext = params.ext || 'tsx'; const filename = `App.${ext}`; const files = encodeURIComponent( JSON.stringify({ diff --git a/plugins/remark-snackplayer/tests/markdown/test1.md b/plugins/remark-snackplayer/tests/markdown/test1.md index 052c2822cf4..5b72ca8e12b 100644 --- a/plugins/remark-snackplayer/tests/markdown/test1.md +++ b/plugins/remark-snackplayer/tests/markdown/test1.md @@ -1,4 +1,4 @@ -```SnackPlayer name=Hello%20World +```SnackPlayer name=Hello%20World%20100%25%20Native import React from 'react'; import { Text, View } from 'react-native'; diff --git a/plugins/remark-snackplayer/tests/output/output1.html b/plugins/remark-snackplayer/tests/output/output1.html index 3080ebb7414..6da9f267405 100644 --- a/plugins/remark-snackplayer/tests/output/output1.html +++ b/plugins/remark-snackplayer/tests/output/output1.html @@ -1,6 +1,6 @@