Skip to content

Commit a4853e9

Browse files
committed
Bump to v1.0.2
1 parent ba4ab24 commit a4853e9

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
66

77
## [Unreleased]
88

9+
## [1.0.2] - 2022-10-19
10+
11+
### Changed
12+
13+
- Fix trailing whitespace stripping to not including newlines.
14+
915
## [1.0.1] - 2022-10-18
1016

1117
### Changed
@@ -37,7 +43,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
3743

3844
- 🎉 Initial release! 🎉
3945

40-
[unreleased]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.0.1...HEAD
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
4148
[1.0.1]: https://github.com/ruby-syntax-tree/prettier_print/compare/v1.0.0...v1.0.1
4249
[1.0.0]: https://github.com/ruby-syntax-tree/prettier_print/compare/v0.1.0...v1.0.0
4350
[0.1.0]: https://github.com/ruby-syntax-tree/prettier_print/compare/df51ce...v0.1.0

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
prettier_print (1.0.1)
4+
prettier_print (1.0.2)
55

66
GEM
77
remote: https://rubygems.org/

lib/prettier_print.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def <<(object)
291291

292292
def trim!
293293
length = output.length
294-
output.rstrip!
294+
output.gsub!(/[\t ]*\z/, "")
295295
length - output.length
296296
end
297297
end
@@ -323,7 +323,7 @@ def trim!
323323

324324
if output.any? && output.last.is_a?(String) && !output.last.frozen?
325325
length = output.last.length
326-
output.last.rstrip!
326+
output.last.gsub!(/[\t ]*\z/, "")
327327
trimmed += length - output.last.length
328328
end
329329

lib/prettier_print/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
class PrettierPrint
4-
VERSION = "1.0.1"
4+
VERSION = "1.0.2"
55
end

0 commit comments

Comments
 (0)