utopia-project 0.17.4 → 0.18.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: a6176970e81e3db9ebf924a9eed9861a31138b43d6db9a29054856abd87e154f
4
- data.tar.gz: 3a367e385bcdc566400ab235bbf291ad58165f03593a5e0f9ab1800df605b697
3
+ metadata.gz: 24fda7ece0102628b1160b9f9b93cc15ca75ac1c7f7ed6d1a674521705ba96f3
4
+ data.tar.gz: 4ca114651629fefcc0a5db05ac38712c96454e2f8de97b53fabc0bae1d18e2d2
5
5
  SHA512:
6
- metadata.gz: e37cf4cbe1dfd1d7301bab29990c71363970afc6c339991bd0de327cdbd875f2adef1b2802904d0a77ac96c41c7d297f87b7fe61e393645edab294d2936abe57
7
- data.tar.gz: edad3d8c936317fa48d03dbafb4294e8c9d0115700bbedad69d296f735cbff7122e50e501b032a5f2b069851532a22d709388652276c061c4ea60506519b3e68
6
+ metadata.gz: e2ff765506a5841b132cfea27267c2ab1a50d319d127b7ec6c55342c99a7321216c04c593e814a8bd5959189b1c7c2bec37a43865c36a71a46a102a111d57550
7
+ data.tar.gz: 24d6eb555a6540e181cf62ab7172864ecb88bde77cb8e0a2924655f868753ece0d6e7a9d6ebc5f16dae9bb6e33bbb77aba8a5105fcf5468e9181324e95b7726b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -20,7 +20,7 @@
20
20
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
  # THE SOFTWARE.
22
22
 
23
- require 'markly'
23
+ require_relative 'renderer'
24
24
 
25
25
  module Utopia
26
26
  module Project
@@ -69,7 +69,7 @@ module Utopia
69
69
  end
70
70
 
71
71
  def to_html(node = self.root, **options)
72
- renderer = Markly::HTMLRenderer.new(ids: true, flags: Markly::UNSAFE, **options)
72
+ renderer = Renderer.new(ids: true, flags: Markly::UNSAFE, **options)
73
73
  Trenni::MarkupString.raw(renderer.render(node))
74
74
  end
75
75
 
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ # of this software and associated documentation files (the "Software"), to deal
7
+ # in the Software without restriction, including without limitation the rights
8
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ # copies of the Software, and to permit persons to whom the Software is
10
+ # furnished to do so, subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in
13
+ # all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ # THE SOFTWARE.
22
+
23
+ require 'markly'
24
+ require 'markly/renderer/html'
25
+
26
+ module Utopia
27
+ module Project
28
+ class Renderer < Markly::Renderer::HTML
29
+ def code_block(node)
30
+ language, _ = node.fence_info.split(/\s+/, 2)
31
+
32
+ if language == "mermaid"
33
+ block do
34
+ out(
35
+ "<div#{source_position(node)} class=\"mermaid\">",
36
+ escape_html(node.string_content),
37
+ "</div>"
38
+ )
39
+ end
40
+ else
41
+ super
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Utopia
24
24
  module Project
25
- VERSION = "0.17.4"
25
+ VERSION = "0.18.0"
26
26
  end
27
27
  end
data/pages/_page.xnode CHANGED
@@ -17,12 +17,14 @@
17
17
 
18
18
  <script src="/_components/jquery/jquery.min.js"></script>
19
19
  <script src="/_components/jquery-syntax/jquery.syntax.min.js"></script>
20
+ <script src="/_components/mermaid/mermaid.min.js"></script>
20
21
 
21
22
  <script src="/_static/links.js"></script>
22
23
 
23
24
  <script type="text/javascript">
24
25
  //<![CDATA[
25
26
  jQuery(function($) {
27
+ mermaid.init();
26
28
  $.syntax();
27
29
  });
28
30
  //]]>
@@ -38,4 +40,4 @@
38
40
  <footer>Documentation generated by <a href="https://github.com/socketry/utopia-project">Utopia::Project</a>.</footer>
39
41
  </main>
40
42
  </body>
41
- </html>
43
+ </html>
data/public/.DS_Store ADDED
Binary file
Binary file