review 5.4.0 → 5.5.0
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 +4 -4
- data/NEWS.ja.md +15 -0
- data/NEWS.md +16 -0
- data/doc/format.ja.md +6 -2
- data/lib/review/builder.rb +22 -1
- data/lib/review/compiler.rb +4 -1
- data/lib/review/htmlbuilder.rb +25 -0
- data/lib/review/index_builder.rb +13 -1
- data/lib/review/latexbuilder.rb +23 -1
- data/lib/review/plaintextbuilder.rb +1 -1
- data/lib/review/version.rb +1 -1
- data/lib/review/yamlloader.rb +1 -0
- data/review.gemspec +1 -0
- data/samples/syntax-book/ch02.re +7 -1
- data/test/assets/syntax_book_index_detail.txt +2 -2
- data/test/test_htmlbuilder.rb +34 -0
- data/test/test_latexbuilder.rb +34 -0
- data/test/test_markdownbuilder.rb +32 -0
- data/test/test_plaintextbuilder.rb +25 -0
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1f097d4affd13c0fc3522a4b8a95f7cc293c6ae1f5096060d8cb3a27e55bfe0
|
4
|
+
data.tar.gz: 3690f0b732e216aca3a2a267f16b15f838d86facbb3615d07f70eae83223054e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99517b9b71d5d8adf7c89cfc9c2f09d9a53efdffccadef5f57881e0e205d1b6415f1d9e5bdd9ad0847787b5176a7b4da5a00150752de880a31145cc1224e8cd8
|
7
|
+
data.tar.gz: fbf5fcde5e37bc49ad32cc0f1ac96cfca2b88f35f2067c16ce2f3a35758426ea50c5eaf7ef91eaad174f7bfc07bec05f254106cbf969152d1a6fd7b7fe79a197
|
data/NEWS.ja.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
# Version 5.5.0
|
2
|
+
## 新機能
|
3
|
+
* 節や項を参照するインライン命令として、 `@<secref>` , `@<sec>` , `@<sectitle>` を追加しました。`@<secref>` は節や項の番号+タイトルを含むテキスト( `@<hd>` と同じ)、 `@<sec>` は節や項の番号のみ、`@<sectitle>` はタイトルのみに展開されます ([#1809])
|
4
|
+
## バグ修正
|
5
|
+
* テストエラーを修正しました ([#1804])
|
6
|
+
* review-update コマンドがエラーになるのを修正しました ([#1807])
|
7
|
+
|
8
|
+
## その他
|
9
|
+
* rexml がバンドル gem 扱いになったので、gemspec に追加しました ([#1808])
|
10
|
+
|
11
|
+
[#1804]: https://github.com/kmuto/review/pull/1804
|
12
|
+
[#1807]: https://github.com/kmuto/review/pull/1807
|
13
|
+
[#1808]: https://github.com/kmuto/review/pull/1808
|
14
|
+
[#1809]: https://github.com/kmuto/review/issues/1809
|
15
|
+
|
1
16
|
# Version 5.4.0
|
2
17
|
## 新機能
|
3
18
|
* Re:VIEW に関する質問の受け付けに対応する [GitHub Discussions](https://github.com/kmuto/review/discussions) を開始しました
|
data/NEWS.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
# Version 5.5.0
|
2
|
+
## New Features
|
3
|
+
* introduced `@<secref>`, `@<sec>`, and `@<sectitle>` as inline op to refer sections ([#1809])
|
4
|
+
|
5
|
+
## Bug Fixes
|
6
|
+
* fixed test error ([#1804])
|
7
|
+
* fixed an error of review-update ([#1807])
|
8
|
+
|
9
|
+
## Others
|
10
|
+
* added rexml to gemspec ([#1808])
|
11
|
+
|
12
|
+
[#1804]: https://github.com/kmuto/review/pull/1804
|
13
|
+
[#1807]: https://github.com/kmuto/review/pull/1807
|
14
|
+
[#1808]: https://github.com/kmuto/review/pull/1808
|
15
|
+
[#1809]: https://github.com/kmuto/review/issues/1809
|
16
|
+
|
1
17
|
# Version 5.4.0
|
2
18
|
## New Features
|
3
19
|
* [GitHub Discussions](https://github.com/kmuto/review/discussions) has been opened to answer questions about Re:VIEW
|
data/doc/format.ja.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Re:VIEW フォーマットの文法について解説します。Re:VIEW フォーマットはアスキー社(現カドカワ)の EWB を基本としながら、一部に RD や各種 Wiki の文法を取り入れて簡素化しています。
|
4
4
|
|
5
|
-
このドキュメントは、Re:VIEW 5.
|
5
|
+
このドキュメントは、Re:VIEW 5.5 に基づいています。
|
6
6
|
|
7
7
|
## 段落
|
8
8
|
|
@@ -796,7 +796,7 @@ imgmath_options:
|
|
796
796
|
@<hd>{preface|はじめに|まずは}
|
797
797
|
```
|
798
798
|
|
799
|
-
|
799
|
+
参照先にラベルが設定されている場合は、見出しの代わりに、ラベルで参照します。複雑な階層をとるときにはラベルを使うことを推奨します。
|
800
800
|
|
801
801
|
```
|
802
802
|
=={hajimeni} はじめに
|
@@ -806,6 +806,10 @@ imgmath_options:
|
|
806
806
|
@<hd>{hajimeni|まずは}
|
807
807
|
```
|
808
808
|
|
809
|
+
* `@<hd>{見出しまたはラベル}` あるいは `@<secref>{見出しまたはラベル}` : 『「1.1 まずは」』のように、節項番号とタイトルを含むテキストに置換されます。
|
810
|
+
* `@<sec>{見出しまたはラベル}` : 「1.1」のような節項番号に置換されます。番号が付かない箇所の場合はエラーになります。
|
811
|
+
* `@<sectitle>{見出しまたはラベル}` : 「まずは」のように、節項のタイトル部に置換されます。
|
812
|
+
|
809
813
|
### コラム見出し参照
|
810
814
|
|
811
815
|
コラムの見出しの参照は、インライン命令 `@<column>` を使います。
|
data/lib/review/builder.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2002-
|
1
|
+
# Copyright (c) 2002-2022 Minero Aoki, Kenshi Muto
|
2
2
|
#
|
3
3
|
# This program is free software.
|
4
4
|
# You can distribute or modify this program under the terms of
|
@@ -450,6 +450,27 @@ module ReVIEW
|
|
450
450
|
app_error "unknown headline: #{id}"
|
451
451
|
end
|
452
452
|
|
453
|
+
alias_method :inline_secref, :inline_hd
|
454
|
+
|
455
|
+
def inline_sec(id)
|
456
|
+
chapter, id = extract_chapter_id(id)
|
457
|
+
n = chapter.headline_index.number(id)
|
458
|
+
if n.present? && chapter.number && over_secnolevel?(n)
|
459
|
+
n
|
460
|
+
else
|
461
|
+
app_error "the target headline doesn't have a number: #{id}"
|
462
|
+
end
|
463
|
+
rescue KeyError
|
464
|
+
app_error "unknown headline: #{id}"
|
465
|
+
end
|
466
|
+
|
467
|
+
def inline_sectitle(id)
|
468
|
+
chapter, id = extract_chapter_id(id)
|
469
|
+
compile_inline(chapter.headline(id).caption)
|
470
|
+
rescue KeyError
|
471
|
+
app_error "unknown headline: #{id}"
|
472
|
+
end
|
473
|
+
|
453
474
|
def inline_column(id)
|
454
475
|
m = /\A([^|]+)\|(.+)/.match(id)
|
455
476
|
if m && m[1]
|
data/lib/review/compiler.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2009-
|
1
|
+
# Copyright (c) 2009-2022 Minero Aoki, Kenshi Muto
|
2
2
|
# Copyright (c) 2002-2007 Minero Aoki
|
3
3
|
#
|
4
4
|
# This program is free software.
|
@@ -232,6 +232,9 @@ module ReVIEW
|
|
232
232
|
definline :code
|
233
233
|
definline :bib
|
234
234
|
definline :hd
|
235
|
+
definline :secref
|
236
|
+
definline :sec
|
237
|
+
definline :sectitle
|
235
238
|
definline :href
|
236
239
|
definline :recipe
|
237
240
|
definline :column
|
data/lib/review/htmlbuilder.rb
CHANGED
@@ -1112,6 +1112,31 @@ EOS
|
|
1112
1112
|
app_error "unknown headline: #{id}"
|
1113
1113
|
end
|
1114
1114
|
|
1115
|
+
def inline_sec(id)
|
1116
|
+
if @book.config['chapterlink']
|
1117
|
+
chap, id2 = extract_chapter_id(id)
|
1118
|
+
n = chap.headline_index.number(id2)
|
1119
|
+
anchor = 'h' + n.tr('.', '-')
|
1120
|
+
%Q(<a href="#{chap.id}#{extname}##{anchor}">#{super(id)}</a>)
|
1121
|
+
else
|
1122
|
+
super(id)
|
1123
|
+
end
|
1124
|
+
rescue KeyError
|
1125
|
+
app_error "unknown headline: #{id}"
|
1126
|
+
end
|
1127
|
+
|
1128
|
+
def inline_sectitle(id)
|
1129
|
+
if @book.config['chapterlink']
|
1130
|
+
chap, id2 = extract_chapter_id(id)
|
1131
|
+
anchor = 'h' + chap.headline_index.number(id2).tr('.', '-')
|
1132
|
+
%Q(<a href="#{chap.id}#{extname}##{anchor}">#{super(id)}</a>)
|
1133
|
+
else
|
1134
|
+
super(id)
|
1135
|
+
end
|
1136
|
+
rescue KeyError
|
1137
|
+
app_error "unknown headline: #{id}"
|
1138
|
+
end
|
1139
|
+
|
1115
1140
|
def column_label(id, chapter = @chapter)
|
1116
1141
|
num = chapter.column(id).number
|
1117
1142
|
"column-#{num}"
|
data/lib/review/index_builder.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2008-
|
1
|
+
# Copyright (c) 2008-2022 Minero Aoki, Kenshi Muto, Masayoshi Takahashi,
|
2
2
|
# KADO Masanori
|
3
3
|
#
|
4
4
|
# This program is free software.
|
@@ -517,6 +517,18 @@ module ReVIEW
|
|
517
517
|
''
|
518
518
|
end
|
519
519
|
|
520
|
+
def inline_secref(_id)
|
521
|
+
''
|
522
|
+
end
|
523
|
+
|
524
|
+
def inline_sec(_id)
|
525
|
+
''
|
526
|
+
end
|
527
|
+
|
528
|
+
def inline_sectitle(_id)
|
529
|
+
''
|
530
|
+
end
|
531
|
+
|
520
532
|
def inline_bib(_id)
|
521
533
|
''
|
522
534
|
end
|
data/lib/review/latexbuilder.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Copyright (c) 2002-2007 Minero Aoki
|
2
2
|
# 2008-2009 Minero Aoki, Kenshi Muto
|
3
|
-
# 2010-
|
3
|
+
# 2010-2022 Minero Aoki, Kenshi Muto, TAKAHASHI Masayoshi
|
4
4
|
#
|
5
5
|
# This program is free software.
|
6
6
|
# You can distribute or modify this program under the terms of
|
@@ -1290,6 +1290,28 @@ module ReVIEW
|
|
1290
1290
|
end
|
1291
1291
|
end
|
1292
1292
|
|
1293
|
+
def inline_sec(id)
|
1294
|
+
if @book.config['chapterlink']
|
1295
|
+
n = super(id)
|
1296
|
+
anchor = n.tr('.', '-')
|
1297
|
+
macro('reviewsecref', n, sec_label(anchor))
|
1298
|
+
else
|
1299
|
+
super(id)
|
1300
|
+
end
|
1301
|
+
rescue KeyError
|
1302
|
+
app_error "unknown headline: #{id}"
|
1303
|
+
end
|
1304
|
+
|
1305
|
+
def inline_sectitle(id)
|
1306
|
+
if @book.config['chapterlink']
|
1307
|
+
chap, id2 = extract_chapter_id(id)
|
1308
|
+
anchor = chap.headline_index.number(id2).tr('.', '-')
|
1309
|
+
macro('reviewsecref', super(id), sec_label(anchor))
|
1310
|
+
else
|
1311
|
+
super(id)
|
1312
|
+
end
|
1313
|
+
end
|
1314
|
+
|
1293
1315
|
def inline_column_chap(chapter, id)
|
1294
1316
|
macro('reviewcolumnref',
|
1295
1317
|
I18n.t('column', compile_inline(chapter.column(id).caption)),
|
data/lib/review/version.rb
CHANGED
data/lib/review/yamlloader.rb
CHANGED
data/review.gemspec
CHANGED
data/samples/syntax-book/ch02.re
CHANGED
@@ -332,10 +332,16 @@ a_{m1} & \cdots & a_{mn}
|
|
332
332
|
* 章題:@<title>{ch01}、@<title>{part2}、@<title>{appA}、@<title>{bib}
|
333
333
|
* 章番号+題:@<chapref>{ch02}、@<chapref>{part2}、@<chapref>{appA}、@<chapref>{bib}
|
334
334
|
|
335
|
-
節や項への参照はhdを使います。
|
335
|
+
節や項への参照はhdまたはsecを使います。
|
336
336
|
|
337
337
|
* @<hd>{ch02|ブロック命令}の@<hd>{ch02|ブロック命令|図}
|
338
338
|
* @<hd>{ch02|crossref}
|
339
|
+
* @<secref>{ch02|ブロック命令}の@<secref>{ch02|ブロック命令|図}
|
340
|
+
* @<secref>{ch02|crossref}
|
341
|
+
* @<sec>{ch02|ブロック命令}の@<sec>{ch02|ブロック命令|図}
|
342
|
+
* @<sec>{ch02|crossref}
|
343
|
+
* @<sectitle>{ch02|ブロック命令}の@<sectitle>{ch02|ブロック命令|図}
|
344
|
+
* @<sectitle>{ch02|crossref}
|
339
345
|
* コラム参照 @<column>{ch03|column2}
|
340
346
|
|
341
347
|
他章への図表リスト参照の例です(@<list>{pre01|main1}、@<img>{pre01|fractal}、@<table>{pre01|tbl1}、@<list>{appA|lista-1}、@<img>{appA|puzzle}、@<table>{appA|taba-1})。
|
@@ -26,7 +26,7 @@
|
|
26
26
|
-----------------------------
|
27
27
|
169C 2L 0.2P 第II部 部見出し■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□
|
28
28
|
=============================
|
29
|
-
|
29
|
+
5858C 186L 11P ch02
|
30
30
|
-----------------------------
|
31
31
|
52C 1L 0.0P 第2章 長い章見出し■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□■□
|
32
32
|
10C 1L 0.0P 2.1 ブロック命令
|
@@ -39,7 +39,7 @@
|
|
39
39
|
11C 1L 0.0P 2.4 インライン命令
|
40
40
|
967C 17L 1.3P 2.4.1 書体
|
41
41
|
74C 1L 0.0P 2.4.2 見出し内 BOLD,ITALIC,TT,STRONG,EM,CODE,TTB,TTI,AMI,BOU,KW,UNDERLINE,INS、
|
42
|
-
|
42
|
+
859C 28L 1.6P 2.4.3 参照
|
43
43
|
39C 2L 0.1P 2.4.4 参考文献
|
44
44
|
194C 3L 0.3P 2.4.5 索引
|
45
45
|
34C 3L 0.1P 2.4.5.1 後注
|
data/test/test_htmlbuilder.rb
CHANGED
@@ -372,6 +372,40 @@ EOS
|
|
372
372
|
end
|
373
373
|
end
|
374
374
|
|
375
|
+
def test_inline_sec
|
376
|
+
def @chapter.headline_index
|
377
|
+
item = Book::Index::Item.new('chap1|test', [1, 1], 'te_st<>')
|
378
|
+
idx = Book::HeadlineIndex.new(self)
|
379
|
+
idx.add_item(item)
|
380
|
+
idx
|
381
|
+
end
|
382
|
+
|
383
|
+
@config['secnolevel'] = 3
|
384
|
+
actual = compile_inline('test @<secref>{test}')
|
385
|
+
assert_equal 'test <a href="-.html#h1-1-1">「1.1.1 te_st<>」</a>', actual
|
386
|
+
actual = compile_inline('test @<sectitle>{test}')
|
387
|
+
assert_equal 'test <a href="-.html#h1-1-1">te_st<></a>', actual
|
388
|
+
actual = compile_inline('test @<sec>{test}')
|
389
|
+
assert_equal 'test <a href="-.html#h1-1-1">1.1.1</a>', actual
|
390
|
+
|
391
|
+
@config['secnolevel'] = 2
|
392
|
+
actual = compile_inline('test @<secref>{test}')
|
393
|
+
assert_equal 'test <a href="-.html#h1-1-1">「te_st<>」</a>', actual
|
394
|
+
actual = compile_inline('test @<sectitle>{test}')
|
395
|
+
assert_equal 'test <a href="-.html#h1-1-1">te_st<></a>', actual
|
396
|
+
assert_raises(ReVIEW::ApplicationError) { compile_block('test @<sec>{test}') }
|
397
|
+
assert_match(/the target headline doesn't have a number/, @log_io.string)
|
398
|
+
|
399
|
+
@config['chapterlink'] = nil
|
400
|
+
@config['secnolevel'] = 3
|
401
|
+
actual = compile_inline('test @<secref>{test}')
|
402
|
+
assert_equal 'test 「1.1.1 te_st<>」', actual
|
403
|
+
actual = compile_inline('test @<sectitle>{test}')
|
404
|
+
assert_equal 'test te_st<>', actual
|
405
|
+
actual = compile_inline('test @<sec>{test}')
|
406
|
+
assert_equal 'test 1.1.1', actual
|
407
|
+
end
|
408
|
+
|
375
409
|
def test_inline_uchar
|
376
410
|
actual = compile_inline('test @<uchar>{2460} test2')
|
377
411
|
assert_equal 'test ① test2', actual
|
data/test/test_latexbuilder.rb
CHANGED
@@ -288,6 +288,40 @@ EOS
|
|
288
288
|
assert_equal 'test 「1.1.1 te\\textunderscore{}st」 test2', actual
|
289
289
|
end
|
290
290
|
|
291
|
+
def test_inline_sec
|
292
|
+
def @chapter.headline_index
|
293
|
+
item = Book::Index::Item.new('chap1|test', [1, 1], 'te_st<>')
|
294
|
+
idx = Book::HeadlineIndex.new(self)
|
295
|
+
idx.add_item(item)
|
296
|
+
idx
|
297
|
+
end
|
298
|
+
|
299
|
+
@config['secnolevel'] = 3
|
300
|
+
actual = compile_inline('test @<secref>{test}')
|
301
|
+
assert_equal 'test \reviewsecref{「1.1.1 te\textunderscore{}st\textless{}\textgreater{}」}{sec:1-1-1}', actual
|
302
|
+
actual = compile_inline('test @<sectitle>{test}')
|
303
|
+
assert_equal 'test \reviewsecref{te\textunderscore{}st\textless{}\textgreater{}}{sec:1-1-1}', actual
|
304
|
+
actual = compile_inline('test @<sec>{test}')
|
305
|
+
assert_equal 'test \reviewsecref{1.1.1}{sec:1-1-1}', actual
|
306
|
+
|
307
|
+
@config['secnolevel'] = 2
|
308
|
+
actual = compile_inline('test @<secref>{test}')
|
309
|
+
assert_equal 'test \reviewsecref{「te\textunderscore{}st\textless{}\textgreater{}」}{sec:1-1-1}', actual
|
310
|
+
actual = compile_inline('test @<sectitle>{test}')
|
311
|
+
assert_equal 'test \reviewsecref{te\textunderscore{}st\textless{}\textgreater{}}{sec:1-1-1}', actual
|
312
|
+
assert_raises(ReVIEW::ApplicationError) { compile_block('test @<sec>{test}') }
|
313
|
+
assert_match(/the target headline doesn't have a number/, @log_io.string)
|
314
|
+
|
315
|
+
@config['chapterlink'] = nil
|
316
|
+
@config['secnolevel'] = 3
|
317
|
+
actual = compile_inline('test @<secref>{test}')
|
318
|
+
assert_equal 'test 「1.1.1 te\textunderscore{}st\textless{}\textgreater{}」', actual
|
319
|
+
actual = compile_inline('test @<sectitle>{test}')
|
320
|
+
assert_equal 'test te\textunderscore{}st\textless{}\textgreater{}', actual
|
321
|
+
actual = compile_inline('test @<sec>{test}')
|
322
|
+
assert_equal 'test 1.1.1', actual
|
323
|
+
end
|
324
|
+
|
291
325
|
def test_inline_pageref
|
292
326
|
actual = compile_inline('test p.@<pageref>{p1}')
|
293
327
|
assert_equal 'test p.\pageref{p1}', actual
|
@@ -148,6 +148,38 @@ EOS
|
|
148
148
|
assert_equal 'test 「1.1.1 te_st」 test2', actual
|
149
149
|
end
|
150
150
|
|
151
|
+
def test_inline_sec
|
152
|
+
def @chapter.headline_index
|
153
|
+
item = Book::Index::Item.new('chap1|test', [1, 1], 'te_st<>')
|
154
|
+
idx = Book::HeadlineIndex.new(self)
|
155
|
+
idx.add_item(item)
|
156
|
+
idx
|
157
|
+
end
|
158
|
+
|
159
|
+
@config['secnolevel'] = 3
|
160
|
+
actual = compile_inline('test @<secref>{test}')
|
161
|
+
assert_equal 'test <a href="#h1-1-1">「1.1.1 te_st<>」</a>', actual
|
162
|
+
actual = compile_inline('test @<sectitle>{test}')
|
163
|
+
assert_equal 'test te_st<>', actual
|
164
|
+
actual = compile_inline('test @<sec>{test}')
|
165
|
+
assert_equal 'test 1.1.1', actual
|
166
|
+
|
167
|
+
@config['secnolevel'] = 2
|
168
|
+
actual = compile_inline('test @<secref>{test}')
|
169
|
+
assert_equal 'test <a href="#h1-1-1">「te_st<>」</a>', actual
|
170
|
+
actual = compile_inline('test @<sectitle>{test}')
|
171
|
+
assert_equal 'test te_st<>', actual
|
172
|
+
assert_raises(ReVIEW::ApplicationError) { compile_block('test @<sec>{test}') }
|
173
|
+
@config['chapterlink'] = nil
|
174
|
+
@config['secnolevel'] = 3
|
175
|
+
actual = compile_inline('test @<secref>{test}')
|
176
|
+
assert_equal 'test 「1.1.1 te_st<>」', actual
|
177
|
+
actual = compile_inline('test @<sectitle>{test}')
|
178
|
+
assert_equal 'test te_st<>', actual
|
179
|
+
actual = compile_inline('test @<sec>{test}')
|
180
|
+
assert_equal 'test 1.1.1', actual
|
181
|
+
end
|
182
|
+
|
151
183
|
def test_ul_nest1
|
152
184
|
src = <<-EOS
|
153
185
|
* AAA
|
@@ -67,6 +67,31 @@ class PLAINTEXTBuidlerTest < Test::Unit::TestCase
|
|
67
67
|
assert_equal 'http://github.com', actual
|
68
68
|
end
|
69
69
|
|
70
|
+
def test_inline_sec
|
71
|
+
def @chapter.headline_index
|
72
|
+
item = Book::Index::Item.new('chap1|test', [1, 1], 'te_st<>')
|
73
|
+
idx = Book::HeadlineIndex.new(self)
|
74
|
+
idx.add_item(item)
|
75
|
+
idx
|
76
|
+
end
|
77
|
+
|
78
|
+
@config['secnolevel'] = 3
|
79
|
+
actual = compile_inline('test @<secref>{test}')
|
80
|
+
assert_equal 'test 「1.1.1 te_st<>」', actual
|
81
|
+
actual = compile_inline('test @<sectitle>{test}')
|
82
|
+
assert_equal 'test te_st<>', actual
|
83
|
+
actual = compile_inline('test @<sec>{test}')
|
84
|
+
assert_equal 'test 1.1.1', actual
|
85
|
+
|
86
|
+
@config['secnolevel'] = 2
|
87
|
+
actual = compile_inline('test @<secref>{test}')
|
88
|
+
assert_equal 'test 「te_st<>」', actual
|
89
|
+
actual = compile_inline('test @<sectitle>{test}')
|
90
|
+
assert_equal 'test te_st<>', actual
|
91
|
+
assert_raises(ReVIEW::ApplicationError) { compile_block('test @<sec>{test}') }
|
92
|
+
assert_match(/the target headline doesn't have a number/, @log_io.string)
|
93
|
+
end
|
94
|
+
|
70
95
|
def test_inline_raw
|
71
96
|
actual = compile_inline('@<raw>{@<tt>{inline\}}')
|
72
97
|
assert_equal '@<tt>{inline}', actual
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: review
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kmuto
|
8
8
|
- takahashim
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: image_size
|
@@ -25,6 +25,20 @@ dependencies:
|
|
25
25
|
- - ">="
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: rexml
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ">="
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '0'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
28
42
|
- !ruby/object:Gem::Dependency
|
29
43
|
name: rouge
|
30
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -626,7 +640,7 @@ licenses:
|
|
626
640
|
- LGPL
|
627
641
|
metadata:
|
628
642
|
rubygems_mfa_required: 'true'
|
629
|
-
post_install_message:
|
643
|
+
post_install_message:
|
630
644
|
rdoc_options: []
|
631
645
|
require_paths:
|
632
646
|
- lib
|
@@ -641,8 +655,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
641
655
|
- !ruby/object:Gem::Version
|
642
656
|
version: '0'
|
643
657
|
requirements: []
|
644
|
-
rubygems_version: 3.
|
645
|
-
signing_key:
|
658
|
+
rubygems_version: 3.3.7
|
659
|
+
signing_key:
|
646
660
|
specification_version: 4
|
647
661
|
summary: 'Re:VIEW: a easy-to-use digital publishing system'
|
648
662
|
test_files:
|