snibbets 2.0.31 → 2.0.32

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: 67e546441d5515f0c3d14e754843bfc3eed76a5129bff75b810c173d3e0161a8
4
- data.tar.gz: 1e98fc1fb3326dd21dfb1ccecbf4c4b44b6a0f26df8053fc998fc80dc57428cd
3
+ metadata.gz: e6701119f370f7f3a6190d811e5278799c973ed65b7f69a096b2675c91a2a124
4
+ data.tar.gz: 6954526979c677af6c5cf3fece76c0df0eae2f83ae2975c00e2884e99a5a2cda
5
5
  SHA512:
6
- metadata.gz: 32936396eb50e8b9186f15f12333c7603134fe5861d80c070bb0e96ef4e1d8b248103d46b4cba3cd97d8036e9bd0c82b4dc707911434b9fd7ea97282114e77ca
7
- data.tar.gz: 0d22c987dc50165333bfd5d016f3c1d67bd64d842a968c35ec53a5cd2c5e94e95536fee25e54d3c32ba710a6189a84c573d49587baeb34f610f7f3ba6c552b73
6
+ metadata.gz: 4e3cf0a812450aacd9dd69863bb4ba02880fb57049e396ab7d02eb31b024ed12aabe1f84dd4ace68b5ccc3d2c29e09c114776fde050b4bdc5708fcf01dfe5af9
7
+ data.tar.gz: 761105292b069c127ec2e32f0d39235883c4bd75d88b395d1a20b83b7fc6819aec0e9b5df67af14c7a2990196e5611aabf212afead13587ed2d62c2356489d34
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 2.0.32
2
+
3
+ 2023-04-25 17:14
4
+
5
+ #### FIXED
6
+
7
+ - Don't highlight code sent to `--copy`
8
+
1
9
  ### 2.0.31
2
10
 
3
11
  2023-04-20 10:20
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- snibbets (2.0.31)
4
+ snibbets (2.0.32)
5
5
  mdless (~> 1.0, >= 1.0.32)
6
6
  tty-reader (~> 0.9, >= 0.9.0)
7
7
  tty-which (~> 0.5, >= 0.5.0)
data/README.md CHANGED
@@ -159,7 +159,7 @@ Snibbet's implementation of Skylighting has limited but better-looking themes, a
159
159
  ### Usage
160
160
 
161
161
  ```
162
- Snibbets v2.0.31
162
+ Snibbets v2.0.32
163
163
 
164
164
  Usage: snibbets [options] query
165
165
  -a, --all If a file contains multiple snippets, output all of them (no menu)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snibbets
4
- VERSION = '2.0.31'
4
+ VERSION = '2.0.32'
5
5
  end
data/lib/snibbets.rb CHANGED
@@ -286,6 +286,7 @@ module Snibbets
286
286
  end
287
287
  code = snip['code']
288
288
  lang = snip['language']
289
+
289
290
  print(code, filepath, lang)
290
291
  end
291
292
  end
@@ -349,15 +350,15 @@ module Snibbets
349
350
  end
350
351
 
351
352
  def print(output, filepath, syntax = nil)
353
+ if Snibbets.options[:copy]
354
+ OS.copy(Snibbets.options[:all_notes] ? output : output.clean_code)
355
+ warn 'Copied to clipboard'
356
+ end
352
357
  if Snibbets.options[:highlight] && Snibbets.options[:output] == 'raw'
353
358
  $stdout.puts(Highlight.highlight(output, filepath, syntax))
354
359
  else
355
360
  $stdout.puts(Snibbets.options[:all_notes] ? output : output.clean_code)
356
361
  end
357
- if Snibbets.options[:copy]
358
- OS.copy(output)
359
- $stderr.puts "Copied to clipboard"
360
- end
361
362
  end
362
363
  end
363
364
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snibbets
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.31
4
+ version: 2.0.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-20 00:00:00.000000000 Z
11
+ date: 2023-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler