pipetext 0.2.6 → 0.2.7

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: 1a49c4a1db0607a10805da620311a16d0686fb29b5405d1edb329ac9eb3ba05c
4
- data.tar.gz: 761a90f52750d0c933996426770a4482d3edc8fa41890dfaa008cfcb118131cc
3
+ metadata.gz: aa217b6ffbf3d726efa7e28c5f8e190d05f8f09da02995a4a2d575c372674bf4
4
+ data.tar.gz: a272e83e9336d39b158e0cc00467afb5f89d061cba70ce2ee6616ec2bafcd38d
5
5
  SHA512:
6
- metadata.gz: b3635c1e4e698ef6e22694b29afcd7190f1eed0372e8c6f5647b8423fdab781c8f00aa95e6485edb9d465e7ec760073ca3d3af930ab5f34dac872a45e2a7a991
7
- data.tar.gz: 7e4f5b0b2a47d81103e605d0f9ecd3a72e1135d0901797d47db9fd272ffaa94633bd1bdb8a85ce9287768ac93dab02250663e89c47b7c40d78c8fa4b8943c47c
6
+ metadata.gz: ef2b34b99b343908b04aedadcbb7c2c7c943c6430b414097c0f9cbdecffb483b1168f73b375c961f166660626db2dc838aa9fec94b69c5378cb08cd7ac224d67
7
+ data.tar.gz: 9e2dc194f697ba535339ed951534ce7c07eb426ef2ecf42597eefee63f0ee9a8cff3378af057742ab171a1af237a0b4379da07831abf6c4adc222681a9d35dbb
data/bin/pipetext CHANGED
@@ -77,6 +77,7 @@ if(ARGV[0] == nil && STDIN.tty? == true)
77
77
  puts "PipeText capabilities:"
78
78
  puts
79
79
  pipe.paint(pipetext_example)
80
+ puts
80
81
  puts "Command Syntax: #{File.basename(__FILE__)} <filename> | <pipetext>"
81
82
  puts "Example usages:"
82
83
  puts
@@ -195,10 +195,11 @@ module PipeText
195
195
  if(wide == true && wide_count >= 2)
196
196
  if(character[0].ord == 147)
197
197
  length += 1
198
+ else
199
+ length += 1
200
+ wide = false
201
+ wide_count = 0
198
202
  end
199
- length += 1
200
- wide = false
201
- wide_count = 0
202
203
  end
203
204
  end
204
205
  end
@@ -228,20 +229,20 @@ module PipeText
228
229
  attributes['end_capture'] = false
229
230
  end
230
231
  if(attributes['end_capture'] == true && character =~ /[0-9]/)
231
- if(character == '0') # |10+
232
+ if(character == '0') # |10+
232
233
  if(attributes['num'] > 0)
233
234
  attributes['num'] *= 10
234
235
  end
235
- elsif(character >= '1' && character <= '9') # |1+ through |9+
236
+ elsif(character >= '1' && character <= '9') # |1+ through |9+
236
237
  if(attributes['num'] > 0)
237
238
  attributes['num'] *= 10
238
239
  end
239
240
  attributes['num'] += character.to_i
240
241
  end
241
242
  elsif(character == ')' && attributes['variable_capture'] == true && attributes['escape'] == false)
242
- if(attributes['variable'] =~ /=/ && attributes['variable'][0] != '#') # Update
243
+ if(attributes['variable'] =~ /=/ && attributes['variable'][0] != '#') # Update
243
244
  update_variable(attributes)
244
- else # Display
245
+ else # Display
245
246
  emit_variable(new_text, attributes)
246
247
  end
247
248
  elsif(attributes['variable_capture'] == true)
@@ -421,7 +422,7 @@ module PipeText
421
422
  end
422
423
 
423
424
  def emit_variable(new_text, attributes)
424
- if(attributes['variable'][0] == '#') # We are manipulating attributes['num']
425
+ if(attributes['variable'][0] == '#') # We are manipulating attributes['num']
425
426
  if(attributes['variable'][1..-1] =~ /(.*) \-= ?(.*)/ ||
426
427
  attributes['variable'][1..-1] =~ /(.*)\-= ?(.*)/)
427
428
  attributes['num'] = pipetext(escape_fix(attributes['variables'][$1]), attributes['box_mode'],
@@ -475,10 +476,10 @@ module PipeText
475
476
  match_length = 0
476
477
  value_length = 0
477
478
  $substitute_emoji_names.each do |key, value|
478
- if(attributes['emoji'] == key) # Use the most precise match first
479
+ if(attributes['emoji'] == key) # Use the most precise match first
479
480
  emoji = value
480
481
  break
481
- elsif(attributes['emoji'].length <= key.length) # Otherwise use shortest match
482
+ elsif(attributes['emoji'].length <= key.length) # Otherwise use shortest match
482
483
  match = abbreviated_match(attributes['emoji'], key)
483
484
  if(match == 0 && key =~ /-/)
484
485
  match = abbreviated_match(attributes['emoji'], key.sub(/-/, ' '))
@@ -491,7 +492,7 @@ module PipeText
491
492
  end
492
493
  end
493
494
  end
494
- if(emoji == String.new) # No match, put copy input
495
+ if(emoji == String.new) # No match, put copy input
495
496
  new_text << "|[" + attributes['emoji'] + "]"
496
497
  else
497
498
  emoji.split(/\|U/).each do |e|
File without changes
@@ -4,6 +4,5 @@ module PipeText
4
4
 
5
5
  public
6
6
 
7
- VERSION = "0.2.6"
7
+ VERSION = "0.2.7"
8
8
  end
9
-
data/lib/pipetext.rb CHANGED
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipetext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minaswan Nakamoto