jekyll-kroki 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jekyll/kroki/version.rb +1 -1
- data/lib/jekyll/kroki.rb +7 -4
- 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: '048aeae4ac84f1263d620e1e0a6c434c9186a767132bac28a1c45b211e03be2b'
|
4
|
+
data.tar.gz: 05c14efd136bc6e21c77a9ae5ceaa1d81d32bff50538bc00f31aef804dad4165
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0e1a7c0a6886a0ca621617b4bcab1e7fe4871ccaec9c0d7d78f123b5027145c5ba51428f898e00f7d2671051194d31be9510db954f9a0392d118d3f80f75d93
|
7
|
+
data.tar.gz: be573dafbf9f2ed85eab43057845d4cf577f9df5ed6029184400845e51d6301cff14e04d0fbcfb6bf782e457a9cbf0ec67f14c12aaed51e0e464f1935a23d924
|
data/lib/jekyll/kroki/version.rb
CHANGED
data/lib/jekyll/kroki.rb
CHANGED
@@ -17,6 +17,7 @@ module Jekyll
|
|
17
17
|
SUPPORTED_LANGUAGES = %w[actdiag blockdiag bpmn bytefield c4plantuml d2 dbml diagramsnet ditaa erd excalidraw
|
18
18
|
graphviz mermaid nomnoml nwdiag packetdiag pikchr plantuml rackdiag seqdiag structurizr
|
19
19
|
svgbob symbolator tikz umlet vega vegalite wavedrom wireviz].freeze
|
20
|
+
EXPECTED_HTML_TAGS = %w[code div].freeze
|
20
21
|
HTTP_MAX_RETRIES = 3
|
21
22
|
|
22
23
|
class << self
|
@@ -54,10 +55,12 @@ module Jekyll
|
|
54
55
|
|
55
56
|
rendered_diag = 0
|
56
57
|
SUPPORTED_LANGUAGES.each do |language|
|
57
|
-
|
58
|
-
#
|
59
|
-
|
60
|
-
|
58
|
+
EXPECTED_HTML_TAGS.each do |tag|
|
59
|
+
parsed_doc.css("#{tag}[class~='language-#{language}']").each do |diagram_desc|
|
60
|
+
# Replace the diagram description with the SVG representation rendered by Kroki
|
61
|
+
diagram_desc.replace(render_diagram(connection, diagram_desc, language))
|
62
|
+
rendered_diag += 1
|
63
|
+
end
|
61
64
|
end
|
62
65
|
end
|
63
66
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-kroki
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix van Oost
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|