tailwind_merge 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/tailwind_merge/version.rb +1 -1
- data/lib/tailwind_merge.rb +1 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 400ee8fcc7d3e0247fa8fdfd1d41bcaee413cc8cc1470b3eae68eb637aec8a95
|
4
|
+
data.tar.gz: c31e306e40abc9e0663e5379709a7e60e3ae0f4d8ff4ffffacecbaadc16fefc1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c07a82f66386658a55a6b4d20253c337f882a1ca053b6a1498ba999b31f2817af75dfd2d839f7edc774ed0578d1b86a8a8f7c5be9eba118d9b0d77ccaf03ad1
|
7
|
+
data.tar.gz: f6eff1e3ffdebbd8a8d7361f8c53fff06ad6c109f2774d8661e4106ad61461ca2eef4100d3b3bc82289ea42e059f7613aa26a63229429bddc3c57322cf2213a0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [v0.1.2](https://github.com/gjtorikian/tailwind_merge/tree/v0.1.2) (2022-10-11)
|
4
|
+
|
5
|
+
[Full Changelog](https://github.com/gjtorikian/tailwind_merge/compare/v0.1.1...v0.1.2)
|
6
|
+
|
3
7
|
## [v0.1.1](https://github.com/gjtorikian/tailwind_merge/tree/v0.1.1) (2022-10-11)
|
4
8
|
|
5
9
|
[Full Changelog](https://github.com/gjtorikian/tailwind_merge/compare/v0.1.0...v0.1.1)
|
data/lib/tailwind_merge.rb
CHANGED
@@ -34,17 +34,11 @@ module TailwindMerge
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def merge(classes)
|
37
|
-
return merge_class_list(classes) unless has_cache?
|
38
|
-
|
39
37
|
@cache.getset(classes) do
|
40
38
|
merge_class_list(classes)
|
41
39
|
end
|
42
40
|
end
|
43
41
|
|
44
|
-
def has_cache?
|
45
|
-
@cache.nil?
|
46
|
-
end
|
47
|
-
|
48
42
|
private def merge_class_list(classes)
|
49
43
|
# Set of class_group_ids in following format:
|
50
44
|
# `{importantModifier}{variantModifiers}{classGroupId}`
|
@@ -53,7 +47,7 @@ module TailwindMerge
|
|
53
47
|
# @example 'md:!pr'
|
54
48
|
class_groups_in_conflict = Set.new
|
55
49
|
|
56
|
-
classes.strip.split(SPLIT_CLASSES_REGEX).
|
50
|
+
classes.strip.split(SPLIT_CLASSES_REGEX).map do |original_class_name|
|
57
51
|
modifiers, has_important_modifier, base_class_name = split_modifiers(original_class_name)
|
58
52
|
|
59
53
|
class_group_id = @class_utils.class_group_id(base_class_name)
|