booklab-sml 0.3.0 → 0.4.0

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: 1767629aeac09e97ae18ce1b056dc415ef31099c1affb9e4229c1ce77c66af98
4
- data.tar.gz: 434420cf3da51edf14548330bf6d9ebc9d0a03139ced8f71aa5967e155f0c039
3
+ metadata.gz: a29e8fb23fa84105ae92ce79ebb41e9b5f6093a96b9753df6e4e86a0240d7018
4
+ data.tar.gz: 2e374bba32a962c3fea73af545930bd4537fe4219b4d145d500c789229c248cf
5
5
  SHA512:
6
- metadata.gz: 44fe7eb237c13ed61305bcbb7023d2f5b04c2e37cb7bf02c86c198720332965500c9cfd8148e5e06568f774c1f1b652c7e9d9b4789d582b74557e8ccc4967c81
7
- data.tar.gz: 1f060f38cb2d7fd70c4d142204297ef62c867fe8b6cf619c1d23b4b3cebb27edf50646e9b8e56667674d1dc2701c44edb473e76ff8c457a3199ddede7acd87f2
6
+ metadata.gz: a63bdb80125013ec3cfb85987f63d200c239f09aef363ab1a6e2091094677753d65982fe2fb9aef35abdff52907b8d046660a15e28d03145598f6e5b8447dc67
7
+ data.tar.gz: 337b5b5def18137040cda6191e50ad2e6150ea9326c30b10d1fb78ebb34815086fc2c1fed564bb1b89d66dcc3269bdbe561505192c51179d3e264539971d26de
@@ -13,8 +13,13 @@ module BookLab::SML::Rules
13
13
  code = (attrs[:code] || "").strip
14
14
  return "" if code.blank?
15
15
 
16
- svg_code = URI::encode(code)
17
- %(<img src="#{renderer.config.plantuml_service_host}/svg/#{svg_code}" class="plantuml-image" />)
16
+ src = attrs[:src]
17
+ if src
18
+ %(<img src="#{src}" class="plantuml-image" />)
19
+ else
20
+ svg_code = URI::encode(code)
21
+ %(<img src="#{renderer.config.plantuml_service_host}/svg/#{svg_code}" class="plantuml-image" />)
22
+ end
18
23
  end
19
24
  end
20
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module BookLab
4
4
  module SML
5
- VERSION = "0.3.0"
5
+ VERSION = "0.4.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: booklab-sml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-28 00:00:00.000000000 Z
11
+ date: 2019-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport