review 1.7.1 → 1.7.2

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
  SHA1:
3
- metadata.gz: c085c6569216545a739b0b4ed817a350f52e45fd
4
- data.tar.gz: f2fae8c6d527b106e595c43e7a2a990f967a580b
3
+ metadata.gz: 5449a3e4fd04d6c45855f7858fe37e4b73ed92f8
4
+ data.tar.gz: f14a9c926fd798eb05456fccec1d377573ec0e98
5
5
  SHA512:
6
- metadata.gz: da2cf9ca8b6c25720d823d54546c697bc65c53ba2614c3be2632a904391e021d9b6f2aa2d89cc68051f5f28a1bce7f7521b7a28f1050d5a929f942b1e33e9f35
7
- data.tar.gz: 1c13220303cc63f9437f0bc70b58d2e03a6f35c715e5f75678c2eeb50a729946fb7ebaa0644c5af629d82a9d247bdbf9a2a4e87bef64fb970a57d684a23ceab1
6
+ metadata.gz: 4f02063b7744003b7d51b41894c5bc4efba4446c33d7a0990d3054724e5d194109991c4005c083f1a1c1f4bb7fdb92c797cc1a214de8d77d29e664989e434f91
7
+ data.tar.gz: 0442d498dfbbab961286734b7ef544f86ad79f24a3744e6227f1e00b8d99fef12c81c0a27863b5c465f35b01e116cd4068f2f62fe6e926fad76f61eacec8ee36
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Sun Dec 27 16:25:45 2015 Masayoshi Takahashi <takahashimm@gmail.com>
2
+
3
+ * Release 1.7.2
4
+
1
5
  Sun Nov 29 23:12:29 2015 Masayoshi Takahashi <takahashimm@gmail.com>
2
6
 
3
7
  * Release 1.7.1
data/doc/NEWS.ja.md CHANGED
@@ -1,3 +1,9 @@
1
+ # Version 1.7.2の主な変更点
2
+
3
+ ## バグ修正
4
+ * latexbuilderで`//list`がhighlitingなしのときにキャプションが表示されなくなっていたのを修正しました ([#465])
5
+ * markdownbuilderでdefinition listを使うとエラーになるのを修正しました ([#473])
6
+
1
7
  # Version 1.7.1の主な変更点
2
8
 
3
9
  ## バグ修正
data/doc/NEWS.md CHANGED
@@ -1,3 +1,9 @@
1
+ # Version 1.7.2
2
+
3
+ ## Bug Fix
4
+ * Fix latexbuilder to show caption in `//list` without highliting ([#465])
5
+ * Fix markdownbuilder to use definition list ([#473])
6
+
1
7
  # Version 1.7.1
2
8
 
3
9
  ## Bug Fix
@@ -262,7 +262,7 @@ module ReVIEW
262
262
  if highlight_listings?
263
263
  common_code_block_lst(id, lines, 'reviewlistlst', 'caption', caption, lang)
264
264
  else
265
- common_code_block(id, lines, 'reviewlist', nil, lang) do |line, idx|
265
+ common_code_block(id, lines, 'reviewlist', caption, lang) do |line, idx|
266
266
  detab(line) + "\n"
267
267
  end
268
268
  end
@@ -99,6 +99,22 @@ module ReVIEW
99
99
  blank
100
100
  end
101
101
 
102
+ def dl_begin
103
+ puts '<dl>'
104
+ end
105
+
106
+ def dt(line)
107
+ puts "<dt>#{line}</dt>"
108
+ end
109
+
110
+ def dd(lines)
111
+ puts "<dd>#{lines.join}</dd>"
112
+ end
113
+
114
+ def dl_end
115
+ puts '</dl>'
116
+ end
117
+
102
118
  def emlist(lines, caption = nil, lang = nil)
103
119
  blank
104
120
  if caption
@@ -1,3 +1,3 @@
1
1
  module ReVIEW
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.2"
3
3
  end
@@ -277,6 +277,31 @@ class LATEXBuidlerTest < Test::Unit::TestCase
277
277
  assert_equal %Q|\n\\begin{reviewemlist}\n foo\n bar\n\n buz\n\\end{reviewemlist}\n|, actual
278
278
  end
279
279
 
280
+ def test_emlistnum_caption
281
+ actual = compile_block("//emlistnum[cap1]{\nfoo\nbar\n\nbuz\n//}\n")
282
+ assert_equal %Q|\n\\reviewemlistcaption{cap1}\n\\begin{reviewemlist}\n 1: foo\n 2: bar\n 3: \n 4: buz\n\\end{reviewemlist}\n|, actual
283
+ end
284
+
285
+ def test_list
286
+ actual = compile_block("//list[id1][cap1]{\nfoo\nbar\n\nbuz\n//}\n")
287
+ assert_equal %Q|\\reviewlistcaption{リスト1.1: cap1}\n\\begin{reviewlist}\nfoo\nbar\n\nbuz\n\\end{reviewlist}\n|, actual
288
+ end
289
+
290
+ def test_list_lst
291
+ @book.config["highlight"] = {}
292
+ @book.config["highlight"]["latex"] = "listings"
293
+ actual = compile_block("//list[id1][cap1][sql]{\nSELECT COUNT(*) FROM tests WHERE tests.no > 10 AND test.name LIKE 'ABC%'\n//}\n")
294
+ assert_equal %Q|\\begin{reviewlistlst}[caption={cap1},language={sql}]\nSELECT COUNT(*) FROM tests WHERE tests.no > 10 AND test.name LIKE 'ABC%'\n\\end{reviewlistlst}\n|, actual
295
+ end
296
+
297
+ def test_list_lst_with_lang
298
+ @book.config["highlight"] = {}
299
+ @book.config["highlight"]["latex"] = "listings"
300
+ @book.config["highlight"]["lang"] = "sql"
301
+ actual = compile_block("//list[id1][cap1]{\nSELECT COUNT(*) FROM tests WHERE tests.no > 10 AND test.name LIKE 'ABC%'\n//}\n")
302
+ assert_equal %Q|\\begin{reviewlistlst}[caption={cap1},language={sql}]\nSELECT COUNT(*) FROM tests WHERE tests.no > 10 AND test.name LIKE 'ABC%'\n\\end{reviewlistlst}\n|, actual
303
+ end
304
+
280
305
  def test_listnum
281
306
  actual = compile_block("//listnum[test1][ruby]{\nclass Foo\n def foo\n bar\n\n buz\n end\nend\n//}\n")
282
307
  assert_equal %Q|\\reviewlistcaption{リスト1.1: ruby}\n\\begin{reviewlist}\n 1: class Foo\n 2: def foo\n 3: bar\n 4: \n 5: buz\n 6: end\n 7: end\n\\end{reviewlist}\n|, actual
@@ -62,6 +62,23 @@ EOS
62
62
  assert_equal "```shell-session\nlineA\nlineB\n```\n", actual
63
63
  end
64
64
 
65
+
66
+ def test_dlist
67
+ actual = compile_block(": foo\n foo.\n bar.\n")
68
+ assert_equal %Q|<dl>\n<dt>foo</dt>\n<dd>foo.bar.</dd>\n</dl>\n|, actual
69
+ end
70
+
71
+ def test_dlist_with_bracket
72
+ actual = compile_block(": foo[bar]\n foo.\n bar.\n")
73
+ assert_equal %Q|<dl>\n<dt>foo[bar]</dt>\n<dd>foo.bar.</dd>\n</dl>\n|, actual
74
+ end
75
+
76
+ def test_dlist_with_comment
77
+ source = ": title\n body\n\#@ comment\n\#@ comment\n: title2\n body2\n"
78
+ actual = compile_block(source)
79
+ assert_equal %Q|<dl>\n<dt>title</dt>\n<dd>body</dd>\n<dt>title2</dt>\n<dd>body2</dd>\n</dl>\n|, actual
80
+ end
81
+
65
82
  def test_list
66
83
  actual = compile_block(<<-EOS)
67
84
  //list[name][caption]{
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: review
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmuto