postcss-elm-tailwind
Advanced tools
Comparing version 0.3.0 to 0.4.0
@@ -66,9 +66,9 @@ function elmHeader(elmModuleName, elm_fns) { | ||
if (prefix) { | ||
re_neg_with_prefix = new RegExp(`(${prefix})-([p|m])`); | ||
re_neg_with_prefix = new RegExp(`(${prefix})-([a-z])`); | ||
elm = elm.replace(re_neg_with_prefix, "$1neg_$2"); | ||
} | ||
// handle negative at start of string | ||
elm = elm.replace(/^-([p|m])/, "_neg_$1"); | ||
elm = elm.replace(/^-([a-z])/, "_neg_$1"); | ||
// handle negative with variant | ||
elm = elm.replace(/:-([p|m])/, "_neg_$1"); | ||
elm = elm.replace(/:-([a-z])/, "_neg_$1"); | ||
// replace dashes now we have sorted the negative stuff | ||
@@ -75,0 +75,0 @@ elm = elm.replace(/-/g, "_"); |
{ | ||
"name": "postcss-elm-tailwind", | ||
"main": "./index.js", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "PostCSS plugin Tailwind classes for Elm", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -80,2 +80,5 @@ const h = require("../helpers"); | ||
}); | ||
it("negative with variant .sm:-translate-x-1", () => { | ||
assert.equal(h.toElmName(h.fixClass(".sm:-translate-x-1")), "sm_neg_translate_x_1"); | ||
}); | ||
it("with prefix", () => { | ||
@@ -82,0 +85,0 @@ assert.equal( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11374
234