prettier_print 1.0.0 → 1.0.2

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: 9996ce5492af60b6cea9099175af9c31752da258be9de73b9f8e66d55ec5cecb
4
- data.tar.gz: 472a728da7f9c4c8fba5fe93664e50a984cb80ecec14efedfcd94decc72c7593
3
+ metadata.gz: 81a51b0f4acf29f5f26a1eb71aa7f682c48a1a4cde776eb27140304a0b2e970f
4
+ data.tar.gz: 7b72b908730bcff4c4c71205e2c3ee8f3ea77d791873543195c55efb07a78320
5
5
  SHA512:
6
- metadata.gz: 57bb92ec550e11a69502c3f9e7668e0f4c6528025a3a0e45986c4f32f755e43d47342128d1c75fde952853ffe5eb4dddd4ff9f235ab1d30bef66a212f41f9f86
7
- data.tar.gz: eb6ad1645c41cc33ada93ea8570c626968cc09f1f374d11f5bc5c526d375febb43629b09cdbf15e941e8f2d6ec27294e7c8755da4c6e2e94594094b15de23572
6
+ metadata.gz: c5f85439e98bb48f9357b7ef1fbb98f5f85153d921e220ffd77c6e0f4d9aad76975374f8ba4f056770622d807232e5dbb5cdf43938e609f5d22d02a64a67e4fb
7
+ data.tar.gz: f4de2a0f56adb16425bc26861e1a20c05b29db8f8e47fce164e5c1695e731f878e048ab6e042f94f7774fab9b55a6e32c0eb4ac058d82e56c7f640ef57124a6a
data/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2] - 2022-10-19
10
+
11
+ ### Changed
12
+
13
+ - Fix trailing whitespace stripping to not including newlines.
14
+
15
+ ## [1.0.1] - 2022-10-18
16
+
17
+ ### Changed
18
+
19
+ * `breakable_return` - should also break parent
20
+
9
21
  ## [1.0.0] - 2022-10-17
10
22
 
11
23
  ### Added
@@ -31,5 +43,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
31
43
 
32
44
  - 🎉 Initial release! 🎉
33
45
 
34
- [unreleased]: https://github.com/ruby-syntax-tree/prettier_print/compare/v0.1.0...HEAD
35
- [0.1.0]: https://github.com/ruby-syntax-tree/prettier_print/compare/...v0.1.0
46
+ [unreleased]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.0.2...HEAD
47
+ [1.0.2]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.0.1...v1.0.2
48
+ [1.0.1]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.0.0...v1.0.1
49
+ [1.0.0]: https://github.com/ruby-syntax-tree/prettier_print/compare/v0.1.0...v1.0.0
50
+ [0.1.0]: https://github.com/ruby-syntax-tree/prettier_print/compare/df51ce...v0.1.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- prettier_print (1.0.0)
4
+ prettier_print (1.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class PrettierPrint
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.2"
5
5
  end
@@ -291,7 +291,7 @@ class PrettierPrint
291
291
 
292
292
  def trim!
293
293
  length = output.length
294
- output.rstrip!
294
+ output.gsub!(/[\t ]*\z/, "")
295
295
  length - output.length
296
296
  end
297
297
  end
@@ -323,7 +323,7 @@ class PrettierPrint
323
323
 
324
324
  if output.any? && output.last.is_a?(String) && !output.last.frozen?
325
325
  length = output.last.length
326
- output.last.rstrip!
326
+ output.last.gsub!(/[\t ]*\z/, "")
327
327
  trimmed += length - output.last.length
328
328
  end
329
329
 
@@ -809,6 +809,7 @@ class PrettierPrint
809
809
  # formatting like a multi-line string.
810
810
  def breakable_return
811
811
  target << BREAKABLE_RETURN
812
+ break_parent
812
813
  end
813
814
 
814
815
  # A convenience method which is same as follows:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prettier_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Newton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-17 00:00:00.000000000 Z
11
+ date: 2022-10-19 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: