vivlio_pack 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3f7e8cb39772caa7b6b7540b0d27803f073754df8665fc3d20e582e213a9ec1
4
- data.tar.gz: c044a43ce69b0647d33d0e5ebf04cb4fcdd1ca3e0835295c56286c16df92620d
3
+ metadata.gz: 41e213a9546b22330f9c4b0be322133ef7e59d03c17664b1bb5d921368295727
4
+ data.tar.gz: 37ccc0b2f3e97c615a59e4e1562722d2b245c99c5f9042ba7cef1f82c8b5c579
5
5
  SHA512:
6
- metadata.gz: 5fab41d5e18430f80abd15794f6273d7b9f3eec9df8926dcb7688f540007d8989070e119331f92e33f5dd4523af87786c7659442b1746b321271cd4a093bcea0
7
- data.tar.gz: da9c1312aa215c2f3ee9b0c6e278c264ab4ac43a96517f3520ac1c52816d0e500fd602278935e1ac2342be5bd8d16674a1fd063a1ded69db40b3a5e3dd35d28e
6
+ metadata.gz: 9a7e30b5e411a91b3e7210ac91be17837bfd6494fdbb770e6f5a1e4ec98d071a5ebfe7eb2fd139149272d39e3cc3cd4a4aa4950717abd4107ce1ee9cedd5afb0
7
+ data.tar.gz: 8adba412a9bc21e51d05f6b0816cfcecbff4ea485a5aaa3957c110a5a18ca16c745d6cc05905a99dcd6301de379bbc8921cf27cea187047506af0dc504f16457
@@ -25,6 +25,7 @@ module VivlioPack
25
25
  <meta charset="utf-8">
26
26
  <link rel="stylesheet" type="text/css" href="contents/css/style.css">
27
27
  <link rel="stylesheet" type="text/css" href="contents/css/bw.css">
28
+ <link rel="stylesheet" type="text/css" href="contents/css/custom.css">
28
29
  <link href="https://fonts.googleapis.com/css?family=M+PLUS+Rounded+1c" rel="stylesheet">
29
30
  </head>
30
31
  <body>
@@ -56,15 +56,15 @@ module VivlioPack
56
56
  return "<div class='page-break'></div>\n"
57
57
  when /\A%([a-z][a-z0-9\-]*):(.*)/m
58
58
  return "<div class='#{$1}'>#{$2}</div>\n"
59
- when /\A\[begin (\w+)\]\z/
59
+ when /\A\[begin\s+(\w+)(\s+(.+))?\]\z/
60
60
  plugin_name = $~[1]
61
61
  plugin = Renderer.plugin(plugin_name)
62
62
  if plugin
63
63
  @state.push plugin_name
64
- result = plugin.process_begin
64
+ result = plugin.process_begin($~[3])
65
65
  return result if result
66
66
  end
67
- when /\A\[end (\w+)\]\z/
67
+ when /\A\[end\s+(\w+)\]\z/
68
68
  plugin_name = $~[1]
69
69
  plugin = Renderer.plugin(plugin_name)
70
70
  if plugin
@@ -76,6 +76,8 @@ module VivlioPack
76
76
  end
77
77
  raise RuntimeError.new("plugin: #{plugin_name} の対応が合っていません")
78
78
  end
79
+ result = plugin.process_end
80
+ return result if result
79
81
  end
80
82
  end
81
83
 
@@ -119,7 +121,7 @@ module VivlioPack
119
121
  figure_attr = size_class.empty? ? "" : " class=\"#{size_class}\""
120
122
  <<~HTML
121
123
  <figure#{figure_attr}>
122
- <img src="#{link}" alt="#{caption}" />
124
+ <img src="contents/images/#{link}" alt="#{caption}" />
123
125
  <figcaption id="#{name}">#{caption}</figcaption>
124
126
  </figure>
125
127
  HTML
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module VivlioPack
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vivlio_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - youchan