prettier_print 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -2
- data/Gemfile.lock +1 -1
- data/lib/prettier_print/version.rb +1 -1
- data/lib/prettier_print.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81a51b0f4acf29f5f26a1eb71aa7f682c48a1a4cde776eb27140304a0b2e970f
|
4
|
+
data.tar.gz: 7b72b908730bcff4c4c71205e2c3ee8f3ea77d791873543195c55efb07a78320
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
35
|
-
[
|
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
data/lib/prettier_print.rb
CHANGED
@@ -291,7 +291,7 @@ class PrettierPrint
|
|
291
291
|
|
292
292
|
def trim!
|
293
293
|
length = output.length
|
294
|
-
output.
|
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.
|
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.
|
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-
|
11
|
+
date: 2022-10-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|