textbringer-presentation 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c79839a7bba5c9edf03480908e01d39cf58f25c16682ad405a8b5bc7e6668f5c
4
- data.tar.gz: 5354a10987d944e84480c436d8aa9f736415f995fb5b0d44e02c3dd461e2ea04
3
+ metadata.gz: 951aa399b45e7d4d44ec1a4e6470a258b4b0a8e168402c19777f2bc8c4d19df5
4
+ data.tar.gz: 443b306133ed4ee190e8fca5352b0438a254e6def7094ff3299bf3c1553ef18d
5
5
  SHA512:
6
- metadata.gz: 9064b8dd688e91ba0d862fb7e42df1decf74d2c8fb8a8a5adcf2d3719eb3a1e97d500b46e3b7bef2aaac5f0d290569da8d39165928b966fbef9421d7022af148
7
- data.tar.gz: c9a4a947b982ab3b5b0006bba3708745905e5cf8b4a4ddc78b2266e7e95cd898b1d0d98b69526037d6f06fd53b01031a4eab7a59479c7a67bbf95db26d1b550a
6
+ metadata.gz: 1bc4190c4cf12207fe90d36120fa487496263a676802de3696fe0e3b09e421a91b94e97fcbabcbfc92c5fd7b5e219b15279fafb610a23fdd959042c39fe35626
7
+ data.tar.gz: 6afac7976d742f7dd90b825467835c8315c39319bbca82c11c77532604d0420a268ecbea3cea60f68ad3e6bb621c853fa51ba21bb7ee2b1244914004146f4c3b
@@ -53,8 +53,9 @@ module Textbringer
53
53
  img = body.slice(img_re, 1)
54
54
  code_re = /^```([a-z]+)?\n(.*?)^```$/m
55
55
  lang, code = body.scan(code_re)[0]
56
- s = body.sub(img_re, "").sub(code_re, "").strip.
57
- gsub(/^/, left_margin)
56
+ s = body.sub(img_re, "").sub(code_re, "").
57
+ gsub(/\[(.*?)\]\(https?:.*?\)/, '\1').
58
+ strip.gsub(/^/, left_margin)
58
59
  @buffer.insert(s)
59
60
  beginning_of_buffer
60
61
  if img
@@ -117,7 +118,7 @@ module Textbringer
117
118
  img_size = "#{img_width}x#{img_height}"
118
119
  img_bg = @buffer[:presentation_image_background]
119
120
  options = CONFIG.fetch(:presentation_img2sixel_options, "")
120
- STDOUT.print(`convert -resize #{img_size} -gravity center -background '#{img_bg}' -extent #{img_size} '#{img}' - | img2sixel #{options}`)
121
+ STDOUT.print(`convert -resize #{img_size} -gravity center -background '#{img_bg}' -extent #{img_size} '#{img}' - | img2sixel #{options} 2> /dev/null`)
121
122
  STDOUT.flush
122
123
  end
123
124
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Textbringer
4
4
  module Presentation
5
- VERSION = "0.1.2"
5
+ VERSION = "0.1.3"
6
6
  end
7
7
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_runtime_dependency "textbringer"
25
25
  spec.add_runtime_dependency "commonmarker"
26
26
 
27
- spec.add_development_dependency "bundler", "~> 1.14"
27
+ spec.add_development_dependency "bundler"
28
28
  spec.add_development_dependency "rake", "~> 12.0"
29
29
  spec.add_development_dependency "test-unit"
30
30
  spec.add_development_dependency "simplecov"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textbringer-presentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shugo Maeda
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-18 00:00:00.000000000 Z
11
+ date: 2021-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: textbringer
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.14'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.14'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -189,7 +189,7 @@ homepage: https://github.com/shugo/textbringer
189
189
  licenses:
190
190
  - MIT
191
191
  metadata: {}
192
- post_install_message:
192
+ post_install_message:
193
193
  rdoc_options: []
194
194
  require_paths:
195
195
  - lib
@@ -204,8 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
204
  - !ruby/object:Gem::Version
205
205
  version: '0'
206
206
  requirements: []
207
- rubygems_version: 3.1.0.pre1
208
- signing_key:
207
+ rubygems_version: 3.3.0.dev
208
+ signing_key:
209
209
  specification_version: 4
210
210
  summary: Presentation mode for Textbringer.
211
211
  test_files: []