no_comments 0.1.8 → 0.1.9

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: c027187e4d044c39f2f94274675ac81db2753aca4824be006543aea44421de91
4
- data.tar.gz: 024e089a04c15fd8528361d918c0da35a182551f14f0d4567d1aebc9e473d855
3
+ metadata.gz: 4bd25fbe95f21f9b67340ed123921b6b483c3134edbc4b8924f4bff6395daaa8
4
+ data.tar.gz: de4c4dd2964da1ed0720f7265813c27a54f2a98dc5cd66a6c56544276709d9e7
5
5
  SHA512:
6
- metadata.gz: d055e920017f0fd4deaa25ee331aaaf37b851120dc3297178fecc43bd06195ed3a1df9cea969298b66efbb0d0b0add3ec271abfa0f8b334426e6750facacadd0
7
- data.tar.gz: 6307ff40e3e67b62794e41498fb4e3a80934ee13cfa376ea916dd81cf72b2506a020bc9fd9fe5243db9e1b230ef54f438faf13d41164a8127be0e1aea26269a1
6
+ metadata.gz: 58cd74ff623136cd6af53270606a9db22bdd7ea6dec8c7e8b952d05b4c2c91079b53c029a21c8b60fa8e90a2d721cc3a0a39f5807a5fd56bfe82ba4351e4503d
7
+ data.tar.gz: 860f0e0646154364946327a9294464dc933fd191e20cbb2a47f25b342798af9afd5587d8118a134897735f12f08d9420ea9bea0b685f81db3fa8f03a726e3a02
@@ -93,7 +93,10 @@ module NoComments
93
93
 
94
94
  def process_code_line(line)
95
95
  code_part, comment_part = split_line(line)
96
- if comment_part && tool_comment?(comment_part.strip)
96
+
97
+ if code_part.strip.empty? && comment_part.nil?
98
+ @result_lines << line.rstrip
99
+ elsif comment_part && tool_comment?(comment_part.strip)
97
100
  @result_lines << ("#{code_part.rstrip} #{comment_part.strip}")
98
101
  else
99
102
  @comments << [@line_number, comment_part.strip] if comment_part
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NoComments
4
- VERSION = "0.1.8"
4
+ VERSION = "0.1.9"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: no_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justyna
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-25 00:00:00.000000000 Z
11
+ date: 2024-11-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: