slim-embedded-minify 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae5665cb9baa381cc6a7f9abef491e6bc9805c1d7a77af47428a16dd4cd1ce07
4
- data.tar.gz: 7a38354fdb3dacb1ea4c034cce7129f3aa7c66e22d0c7326e685c9cc84d06f9a
3
+ metadata.gz: f18ed0ba3778ee7349be7c14d9d3974077bff29611ecd20eddab983394b38eb3
4
+ data.tar.gz: 9956d7da18d3074e0b9209491db3a057c85fb015823b231d7db11a7c1bbb1c22
5
5
  SHA512:
6
- metadata.gz: a46495c0cf4e673ecf61693e04246d7bea875b2ff6dadddea29b68d94ed4e34a8417cc506243fdf81d9ce718e73b09fd12403edef342e2f4598c72306db93116
7
- data.tar.gz: ea8111ae9eb161bfc10f5b5594cd1c207cc00b50a7c06f823b4b9ca6aabda4dd01ee6d3b68cad86d47fe11b02151a33b12942f55897a9ccacc29eb84d893aa80
6
+ metadata.gz: e9da11747c1bbe17719d9e7844d5f846a0eb28182c64f285dddf6f61fee5330cac386a33c490397ff770c205b38e7895e59961070f9b3110617c9321c539a193
7
+ data.tar.gz: c0b7c531155113b1d118212976dbd60bdd6ed887bca10939ab18c5f881ee98a599cfe329f3bdd6adda8c3a1161403b7cce7cd69a5972de92a44e859b89885cf8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.2.4 - 2023-07-27
4
+
5
+ - Fix deletion of strings when `/*` is present in the string
6
+
3
7
  ## 0.2.3 - 2023-07-27
4
8
 
5
9
  - Fix to not removing line when a block comment if it starts at the end of a line.
@@ -21,12 +21,12 @@ module Slim
21
21
  stripped_quotes = stripped_quotes(line)
22
22
  if stripped_quotes.match?(%r{/\*})
23
23
  multiline_comment = true
24
- line.last.gsub!(/\/\*.*$/, '')
24
+ line.last.sub!(/(?<!['"])\/\*.*$/, '')
25
25
  elsif multiline_comment
26
26
  next unless stripped_quotes.match?(%r{\*/})
27
27
 
28
28
  multiline_comment = false
29
- line.last.gsub!(/.*\*\//, '')
29
+ line.last.sub!(/.*\*\/(?<!['"])/, '')
30
30
  end
31
31
  next if empty_line?(line)
32
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SlimEmbeddedMinify
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim-embedded-minify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-26 00:00:00.000000000 Z
11
+ date: 2023-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slim