rcurses 3.5.1 → 3.6.1

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: 8934ab816af30dae1102a75afcb592b042939cb7d8d779a8909f76a46cb966ce
4
- data.tar.gz: 588f61b7a6c19b080622f7474c97b106c8eabb035f1d16829232d1a5d5470abd
3
+ metadata.gz: feb03695cdc5b1501c957f7ce52814bdb1dc063368b69baa8c65b92fb3317bcc
4
+ data.tar.gz: ca957a0062c4a038284ceade63f15638ca51ed7b3df122f9f4a95ed241a721aa
5
5
  SHA512:
6
- metadata.gz: 35db0c89adafcd194083392ea141b6ea59a0c1e5ead1bd54fb1a74ec56c2e5ef278fb7da69d1b7fc5bd7d1f51b20445cb35227d1518d6dd8fae93ee097f73fb8
7
- data.tar.gz: 9ba55c21ecde3dc2118f95e3f45429592774f2c05ed48475db6800df0c01f745629e8a75a8b67dcf69463dfbfc9e9d5df7449820ea9410b109c9b16cd8b6d12f
6
+ metadata.gz: c170a9abeb98b00ec9f2169040777d3c66e9bd48c316b8a4a35f73bbe527b6642a885b61767416de2c9508fad562f835c6d0798f3da40807ae369d4fa8c19621
7
+ data.tar.gz: 678c593ca2e6c09ba5bd8be5faf5d93516849400c259b2d3cae9c180ed08d082b3c4604f2f73aa4e2741195b5a705aee8ddaa9269bb588b49ee7453403917c2a
data/lib/rcurses.rb CHANGED
@@ -5,7 +5,7 @@
5
5
  # Web_site: http://isene.com/
6
6
  # Github: https://github.com/isene/rcurses
7
7
  # License: Public domain
8
- # Version: 3.5: Added method 'clear' to pane class
8
+ # Version: 3.6.1: Minor fix to clean_ansi
9
9
 
10
10
  require 'io/console' # Basic gem for rcurses
11
11
  require 'io/wait' # stdin handling
@@ -35,13 +35,8 @@ class String
35
35
  end
36
36
 
37
37
  def clean_ansi
38
- # Remove surrounding \e[0m if the string is otherwise unstyled
39
- stripped = self.gsub(/\A\e\[0m/, '').gsub(/\e\[0m\z/, '')
40
- if stripped.pure == stripped
41
- stripped
42
- else
43
- self
44
- end
38
+ # Remove a leading and trailing reset code if present, fixing extra \e[0m introduced by some commands
39
+ self.gsub(/\e\[0m(?=\e\[38;5)/, '').gsub(/\A\e\[0m/, '').gsub(/\e\[0m\z/, '')
45
40
  end
46
41
 
47
42
  def pure
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcurses
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-11 00:00:00.000000000 Z
11
+ date: 2025-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clipboard
@@ -29,8 +29,7 @@ description: 'Create curses applications for the terminal easier than ever. Crea
29
29
  up text (in panes or anywhere in the terminal) in bold, italic, underline, reverse
30
30
  color, blink and in any 256 terminal colors for foreground and background. Use a
31
31
  simple editor to let users edit text in panes. Left, right or center align text
32
- in panes. Cursor movement around the terminal. New in 3.5.1: Added method ''clear''
33
- to pane class.'
32
+ in panes. Cursor movement around the terminal. New in 3.6.1: Minor fix to clean_ansi.'
34
33
  email: g@isene.com
35
34
  executables: []
36
35
  extensions: []