chore: always fold Icon as code preview comment (#2062)

This commit is contained in:
Jakob Guddas
2024-04-18 09:21:10 +02:00
committed by GitHub
parent c2c85fbd5c
commit 439ee3f707

View File

@@ -112,20 +112,13 @@ ${changeFilesLowDPIImageTags}<br/>
<summary>Icon X-rays</summary>
${changeFilesXRayImageTags}
</details>
<summary>Icons as code</summary>
${
// collapse code block if it's too long
readyToUseCode.split('/n').length < 20
? '### Icons as code'
: `<details>
<summary><h3>Icons as code</h3></summary>
`
}
Only working for:
\`lucide-react\`, \`lucide-react-native\`, \`lucide-preact\`, \`lucide-vue-next\`
Works for: \`lucide-react\`, \`lucide-react-native\`, \`lucide-preact\`, \`lucide-vue-next\`
\`\`\`ts
${readyToUseCode}
\`\`\`${readyToUseCode.split('/n').length < 20 ? '' : '\n\n</details>'}
`;
\`\`\`
</details>`;
console.log(commentMarkup);