tailwind_merge 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11bdac9bc7e383d03e99dfcde6ed68cbb68a66949471a588d9b20b1fde0fe131
4
- data.tar.gz: d406c2b1fc35551201b90fc45091141e1361f0205312c32101af44d72179e139
3
+ metadata.gz: 17f5ed4729928d04102694bdba3a69b5ae4a58af125b9808cf2cc23c30aab860
4
+ data.tar.gz: d7439b878d4e8e0ab3750ddefdd7a6137f73e6e53d365c3b3e598f2b27b1674d
5
5
  SHA512:
6
- metadata.gz: d6f89f756d614e384e769be8f45b64530c051159b9a2eff5a5e0159ea58c20332c14de2e25d9e1304d174846bb094ebc34d24d1b6ff1a0bf0802f27a2f91d08b
7
- data.tar.gz: 5ff6834884a37392265f131afae80a0fc8f7296a83073ab65afd44bc546ac9b5a6964ec156b1cc3e0e04ca15e135083da72055f4b9fd9cbc54c07ed5094619cd
6
+ metadata.gz: c100e23dfb78b8b36ce1b6234ad0ab71b640047bd63056851f8fc0b8102ef048e878653e651aae9858fee579878c89495703d6674c62a5874b678825666211e3
7
+ data.tar.gz: d8fd01d2ce37a8f643d1cec519749881d5866e39fec57a49d2d0070dce2979a1c0fe5dc2d04b777eb6a9c5d4a312b15916bb0eb2eee47e472fe271ee1c17f018
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
- ## [Unreleased]
1
+ # Changelog
2
2
 
3
- ## [0.1.0] - 2022-07-17
3
+ ## [Unreleased](https://github.com/gjtorikian/tailwind_merge/tree/HEAD)
4
4
 
5
- - Initial release
5
+ [Full Changelog](https://github.com/gjtorikian/tailwind_merge/compare/v0.1.0...HEAD)
6
+
7
+ **Closed issues:**
8
+
9
+ - Should arrays be supported? [\#1](https://github.com/gjtorikian/tailwind_merge/issues/1)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Fix h-min [\#3](https://github.com/gjtorikian/tailwind_merge/pull/3) ([gjtorikian](https://github.com/gjtorikian))
14
+ - Fix example in README [\#2](https://github.com/gjtorikian/tailwind_merge/pull/2) ([marcoroth](https://github.com/marcoroth))
15
+
16
+ ## [v0.1.0](https://github.com/gjtorikian/tailwind_merge/tree/v0.1.0) (2022-08-15)
17
+
18
+ [Full Changelog](https://github.com/gjtorikian/tailwind_merge/compare/e748f00d53e86ece8ce2543735f3327cb30c1959...v0.1.0)
19
+
20
+
21
+
22
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/README.md CHANGED
@@ -73,7 +73,7 @@ tailwind-merge overrides conflicting classes and keeps everything else untouched
73
73
  ### Resolves non-trivial conflicts
74
74
 
75
75
  ```ruby
76
- twMe@merger.mergerge('inset-x-px -inset-1') # → '-inset-1'
76
+ @merger.merge('inset-x-px -inset-1') # → '-inset-1'
77
77
  @merger.merge('bottom-auto inset-y-6') # → 'inset-y-6'
78
78
  @merger.merge('inline block') # → 'block'
79
79
  ```
data/Rakefile CHANGED
@@ -12,5 +12,3 @@ end
12
12
  require "rubocop/rake_task"
13
13
 
14
14
  RuboCop::RakeTask.new
15
-
16
- task default: [:test, :rubocop]
@@ -63,7 +63,7 @@ module TailwindMerge
63
63
 
64
64
  prefixed_class_group_entries = get_prefixed_class_group_entries(
65
65
  config[:class_groups].map { |cg| [cg[0], cg[1]] },
66
- prefix
66
+ prefix,
67
67
  )
68
68
 
69
69
  prefixed_class_group_entries.each do |(class_group_id, class_group)|
@@ -103,7 +103,7 @@ module TailwindMerge
103
103
  class_definition.call(@config),
104
104
  class_part_object,
105
105
  class_group_id,
106
- theme
106
+ theme,
107
107
  )
108
108
  next
109
109
  end
@@ -121,7 +121,7 @@ module TailwindMerge
121
121
  class_group,
122
122
  get_class_part(class_part_object, key),
123
123
  class_group_id,
124
- theme
124
+ theme,
125
125
  )
126
126
  end
127
127
  end
@@ -583,7 +583,7 @@ module TailwindMerge
583
583
  # Height
584
584
  # @see https://tailwindcss.com/docs/height
585
585
  ##
586
- "h" => [{ "h" => SPACING_WITH_AUTO.call }],
586
+ "h" => [{ "h" => ["auto", "min", "max", "fit", SPACING] }],
587
587
  ##
588
588
  # Min-Height
589
589
  # @see https://tailwindcss.com/docs/min-height
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TailwindMerge
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -96,6 +96,7 @@ module TailwindMerge
96
96
  end.reverse.map { |parsed| parsed[:original_class_name] }.join(" ")
97
97
  end
98
98
 
99
+ SPLIT_MODIFIER_REGEX = /[:\[\]]/
99
100
  private def split_modifiers(class_name)
100
101
  modifiers = []
101
102
 
@@ -105,7 +106,7 @@ module TailwindMerge
105
106
  ss = StringScanner.new(class_name)
106
107
 
107
108
  until ss.eos?
108
- portion = ss.scan_until(/[:\[\]]/)
109
+ portion = ss.scan_until(SPLIT_MODIFIER_REGEX)
109
110
 
110
111
  if portion.nil?
111
112
  ss.terminate
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailwind_merge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen J. Torikian
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-15 00:00:00.000000000 Z
11
+ date: 2022-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lru_redux