create-figma-plugin
create-figma-plugin copied to clipboard
Escaping CSS class names for improved rendering
Fix: Rendering of CSS Class Names with Special Characters
In standard CSS naming conventions, class names can include alphanumeric characters, hyphens, and underscores. However, special characters require escaping to ensure proper rendering. This pull request introduces a regex-based solution that replaces special characters with their corresponding escape sequences. This fix guarantees correct rendering of class names containing special characters.
With this fix, the following code snippets can now be displayed correctly:
<div class="!bg-red-500">...</div>
<div class="py-0.5">...</div>
<div class="w-[100px]">...</div>
<div class="hover:text-gray-200">...</div>