snibbets 2.0.27 → 2.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +19 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/snibbets/string.rb +2 -3
- data/lib/snibbets/version.rb +1 -1
- 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: 6f9f01ad7e1ae9656d572bbd502f4b0dc1fa7d344509a6a93f07b765d515ddca
|
4
|
+
data.tar.gz: 0bc11012e818d56256550af0b3df3fe952307d2f86b8e7da9d91a8a80dfbafee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8926027efe84785a45414761eab33b66474a819ed394e52e1f638c95e5ae7a3aad857df95728640f3ccf68ad0d471b93039b694bfa0d72886b682afad13c3c5
|
7
|
+
data.tar.gz: bfc6c99b3178fb1f7cb8dc3b7aad350cca53e6f560ab19357924291346e6bc74583c9755a945363122105840ef66abee960a8aa9ca75547f23b239be088761b1
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
### 2.0.28
|
2
|
+
|
3
|
+
2023-04-18 09:18
|
4
|
+
|
5
|
+
#### NEW
|
6
|
+
|
7
|
+
- `--nvultra` will open the selected snippet in nvUltra
|
8
|
+
|
9
|
+
#### IMPROVED
|
10
|
+
|
11
|
+
- Use Readline for entering info with `--paste`, allows for better editing experience
|
12
|
+
- Allow `--edit` with `--paste` to open the new snippet in your editor immediately
|
13
|
+
|
14
|
+
#### FIXED
|
15
|
+
|
16
|
+
- Code indentation with `--paste`
|
17
|
+
- Nil error when highlighting without extension
|
18
|
+
- When detecting indented code blocks, require a blank line (or start of file) before them, to avoid picking up lines within indented lists
|
19
|
+
|
1
20
|
### 2.0.27
|
2
21
|
|
3
22
|
2023-04-17 15:54
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -157,7 +157,7 @@ Snibbet's implementation of Skylighting has limited but better-looking themes, a
|
|
157
157
|
### Usage
|
158
158
|
|
159
159
|
```
|
160
|
-
Snibbets v2.0.
|
160
|
+
Snibbets v2.0.28
|
161
161
|
|
162
162
|
Usage: snibbets [options] query
|
163
163
|
-a, --all If a file contains multiple snippets, output all of them (no menu)
|
data/lib/snibbets/string.rb
CHANGED
@@ -125,7 +125,7 @@ module Snibbets
|
|
125
125
|
"<block#{counter}>\n"
|
126
126
|
end
|
127
127
|
|
128
|
-
sans_blocks = sans_blocks.gsub(/(?mi)
|
128
|
+
sans_blocks = sans_blocks.gsub(/(?mi)(?<=\n\n|\A)\n?((?: {4,}|\t+)\S[\S\s]*?)(?=\n\S|\Z)/) do
|
129
129
|
counter += 1
|
130
130
|
code = Regexp.last_match(1).split(/\n/)
|
131
131
|
|
@@ -148,10 +148,9 @@ module Snibbets
|
|
148
148
|
|
149
149
|
parts.each do |part|
|
150
150
|
lines = part.split(/\n/).strip_empty
|
151
|
-
|
152
151
|
next if lines.blocks == 0
|
153
152
|
|
154
|
-
title = lines.count > 1 ? lines.shift.strip.sub(/[.:]$/, '') : 'Default snippet'
|
153
|
+
title = lines.count > 1 && lines[0] !~ /<block\d+>/ ? lines.shift.strip.sub(/[.:]$/, '') : 'Default snippet'
|
155
154
|
block = lines.join("\n").gsub(/<(block\d+)>/) { code_blocks[Regexp.last_match(1)] }
|
156
155
|
|
157
156
|
lang = nil
|
data/lib/snibbets/version.rb
CHANGED
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.
|
4
|
+
version: 2.0.28
|
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-
|
11
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|