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

Commit

Permalink
fix: corrupted css properties in style tag
Browse files Browse the repository at this point in the history
  - For CSS properties that contain '.' in the value.
  • Loading branch information
alok pepakayala authored and joshwiens committed Jul 16, 2017
1 parent 2024e06 commit 2d28c42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ function getAttributeIndex (tag, attr) {
}

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

return function prefixClasses(tag) {
Expand Down

0 comments on commit 2d28c42

Please sign in to comment.