Skip to content
This repository was archived by the owner on Oct 9, 2020. It is now read-only.

Commit 2d28c42

Browse files
alok pepakayalajoshwiens
alok pepakayala
authored andcommitted
fix: corrupted css properties in style tag
- For CSS properties that contain '.' in the value.
1 parent 2024e06 commit 2d28c42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/transformer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ function getAttributeIndex (tag, attr) {
5858
}
5959

6060
function createClassPrefix(classPrefix) {
61-
var re = /\.[\w\-]+/g;
61+
//http://stackoverflow.com/questions/12391760/regex-match-css-class-name-from-single-string-containing-multiple-classes
62+
var re = /\.(-?[_a-zA-Z]+[_a-zA-Z0-9-]*)(?![^\{]*\})/g;
6263
var inStyleTag = false;
6364

6465
return function prefixClasses(tag) {

0 commit comments

Comments
 (0)