asciidoctor 2.0.10 → 2.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +89 -5
- data/LICENSE +1 -1
- data/README-de.adoc +4 -4
- data/README-fr.adoc +4 -4
- data/README-jp.adoc +4 -4
- data/README-zh_CN.adoc +6 -6
- data/README.adoc +14 -10
- data/asciidoctor.gemspec +3 -3
- data/data/locale/attributes-ar.adoc +4 -3
- data/data/locale/attributes-bg.adoc +4 -3
- data/data/locale/attributes-ca.adoc +6 -5
- data/data/locale/attributes-cs.adoc +4 -3
- data/data/locale/attributes-da.adoc +6 -5
- data/data/locale/attributes-de.adoc +4 -4
- data/data/locale/attributes-en.adoc +4 -4
- data/data/locale/attributes-es.adoc +6 -5
- data/data/locale/attributes-fa.adoc +4 -3
- data/data/locale/attributes-fi.adoc +4 -3
- data/data/locale/attributes-fr.adoc +6 -5
- data/data/locale/attributes-hu.adoc +4 -3
- data/data/locale/attributes-id.adoc +4 -3
- data/data/locale/attributes-it.adoc +4 -3
- data/data/locale/attributes-ja.adoc +4 -3
- data/data/locale/{attributes-kr.adoc → attributes-ko.adoc} +4 -3
- data/data/locale/attributes-nb.adoc +4 -3
- data/data/locale/attributes-nl.adoc +4 -3
- data/data/locale/attributes-nn.adoc +4 -3
- data/data/locale/attributes-pl.adoc +8 -7
- data/data/locale/attributes-pt.adoc +6 -5
- data/data/locale/attributes-pt_BR.adoc +6 -5
- data/data/locale/attributes-ro.adoc +4 -3
- data/data/locale/attributes-ru.adoc +6 -5
- data/data/locale/attributes-sr.adoc +4 -4
- data/data/locale/attributes-sr_Latn.adoc +4 -4
- data/data/locale/attributes-sv.adoc +4 -4
- data/data/locale/attributes-tr.adoc +4 -3
- data/data/locale/attributes-uk.adoc +6 -5
- data/data/locale/attributes-zh_CN.adoc +4 -3
- data/data/locale/attributes-zh_TW.adoc +4 -3
- data/data/stylesheets/asciidoctor-default.css +22 -20
- data/lib/asciidoctor.rb +33 -7
- data/lib/asciidoctor/abstract_block.rb +9 -4
- data/lib/asciidoctor/abstract_node.rb +16 -6
- data/lib/asciidoctor/attribute_list.rb +59 -67
- data/lib/asciidoctor/cli/invoker.rb +2 -0
- data/lib/asciidoctor/cli/options.rb +3 -3
- data/lib/asciidoctor/convert.rb +167 -162
- data/lib/asciidoctor/converter.rb +13 -12
- data/lib/asciidoctor/converter/docbook5.rb +3 -7
- data/lib/asciidoctor/converter/html5.rb +59 -42
- data/lib/asciidoctor/converter/manpage.rb +12 -11
- data/lib/asciidoctor/converter/template.rb +3 -0
- data/lib/asciidoctor/document.rb +23 -38
- data/lib/asciidoctor/extensions.rb +2 -2
- data/lib/asciidoctor/helpers.rb +17 -9
- data/lib/asciidoctor/load.rb +101 -101
- data/lib/asciidoctor/parser.rb +26 -23
- data/lib/asciidoctor/path_resolver.rb +14 -12
- data/lib/asciidoctor/reader.rb +14 -7
- data/lib/asciidoctor/rx.rb +5 -4
- data/lib/asciidoctor/substitutors.rb +57 -38
- data/lib/asciidoctor/syntax_highlighter.rb +8 -5
- data/lib/asciidoctor/syntax_highlighter/coderay.rb +1 -1
- data/lib/asciidoctor/syntax_highlighter/highlightjs.rb +12 -4
- data/lib/asciidoctor/syntax_highlighter/prettify.rb +7 -4
- data/lib/asciidoctor/syntax_highlighter/pygments.rb +2 -3
- data/lib/asciidoctor/syntax_highlighter/rouge.rb +15 -7
- data/lib/asciidoctor/table.rb +49 -20
- data/lib/asciidoctor/version.rb +1 -1
- data/man/asciidoctor.1 +6 -6
- data/man/asciidoctor.adoc +3 -3
- metadata +8 -8
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: Apendix
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Precauție
|
5
|
-
//:chapter-
|
6
|
-
//:chapter-refsig: {chapter-
|
5
|
+
//:chapter-signifier: ???
|
6
|
+
//:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Exemplu
|
8
8
|
:figure-caption: Figură
|
9
9
|
:important-caption: Important
|
@@ -11,7 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Listare]
|
12
12
|
ifdef::manname-title[:manname-title: Nume]
|
13
13
|
:note-caption: Notă
|
14
|
-
//:part-
|
14
|
+
//:part-signifier: ???
|
15
|
+
//:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: Prefață]
|
16
17
|
//:section-refsig: ???
|
17
18
|
:table-caption: Tabela
|
@@ -2,18 +2,19 @@
|
|
2
2
|
:appendix-caption: Приложение
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Внимание
|
5
|
-
|
6
|
-
|
5
|
+
:chapter-signifier: Глава
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Пример
|
8
8
|
:figure-caption: Рисунок
|
9
9
|
:important-caption: Важно
|
10
|
-
:last-update-label:
|
10
|
+
:last-update-label: Последнее обновление
|
11
11
|
ifdef::listing-caption[:listing-caption: Листинг]
|
12
12
|
ifdef::manname-title[:manname-title: Название]
|
13
13
|
:note-caption: Примечание
|
14
|
-
|
14
|
+
:part-signifier: Часть
|
15
|
+
:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: Предисловие]
|
16
|
-
|
17
|
+
:section-refsig: Раздел
|
17
18
|
:table-caption: Таблица
|
18
19
|
:tip-caption: Подсказка
|
19
20
|
:toc-title: Содержание
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: Додатак
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Опрез
|
5
|
-
:chapter-
|
6
|
-
:chapter-refsig: {chapter-
|
5
|
+
:chapter-signifier: Поглавље
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Пример
|
8
8
|
:figure-caption: Слика
|
9
9
|
:important-caption: Важно
|
@@ -11,8 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Листинг]
|
12
12
|
ifdef::manname-title[:manname-title: Назив]
|
13
13
|
:note-caption: Белешка
|
14
|
-
:part-
|
15
|
-
:part-refsig: {part-
|
14
|
+
:part-signifier: Део
|
15
|
+
:part-refsig: {part-signifier}
|
16
16
|
ifdef::preface-title[:preface-title: Предговор]
|
17
17
|
:section-refsig: Секција
|
18
18
|
:table-caption: Табела
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: Dodatak
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Oprez
|
5
|
-
:chapter-
|
6
|
-
:chapter-refsig: {chapter-
|
5
|
+
:chapter-signifier: Poglavlje
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Primer
|
8
8
|
:figure-caption: Slika
|
9
9
|
:important-caption: Važno
|
@@ -11,8 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Listing]
|
12
12
|
ifdef::manname-title[:manname-title: Naziv]
|
13
13
|
:note-caption: Beleška
|
14
|
-
:part-
|
15
|
-
:part-refsig: {part-
|
14
|
+
:part-signifier: Deo
|
15
|
+
:part-refsig: {part-signifier}
|
16
16
|
ifdef::preface-title[:preface-title: Predgovor]
|
17
17
|
:section-refsig: Sekcija
|
18
18
|
:table-caption: Tabela
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: Bilaga
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Var uppmärksam
|
5
|
-
:chapter-
|
6
|
-
:chapter-refsig: {chapter-
|
5
|
+
:chapter-signifier: Kapitel
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Exempel
|
8
8
|
:figure-caption: Figur
|
9
9
|
:important-caption: Viktigt
|
@@ -11,8 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Lista]
|
12
12
|
ifdef::manname-title[:manname-title: Namn]
|
13
13
|
:note-caption: Notera
|
14
|
-
:part-
|
15
|
-
:part-refsig: {part-
|
14
|
+
:part-signifier: Del
|
15
|
+
:part-refsig: {part-signifier}
|
16
16
|
ifdef::preface-title[:preface-title: Förord]
|
17
17
|
:section-refsig: Avsnitt
|
18
18
|
:table-caption: Tabell
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: Ek bölüm
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Dikkat
|
5
|
-
//:chapter-
|
6
|
-
//:chapter-refsig: {chapter-
|
5
|
+
//:chapter-signifier: ???
|
6
|
+
//:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Örnek
|
8
8
|
:figure-caption: Görsel
|
9
9
|
:important-caption: Önemli
|
@@ -11,7 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: Listeleme]
|
12
12
|
ifdef::manname-title[:manname-title: İsim]
|
13
13
|
:note-caption: Not
|
14
|
-
//:part-
|
14
|
+
//:part-signifier: ???
|
15
|
+
//:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: Ön söz]
|
16
17
|
//:section-refsig: ???
|
17
18
|
:table-caption: Tablo
|
@@ -2,18 +2,19 @@
|
|
2
2
|
:appendix-caption: Додаток
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: Обережно
|
5
|
-
|
6
|
-
|
5
|
+
:chapter-signifier: Розділ
|
6
|
+
:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: Приклад
|
8
|
-
:figure-caption:
|
8
|
+
:figure-caption: Рисунок
|
9
9
|
:important-caption: Важливо
|
10
10
|
:last-update-label: Востаннє оновлено
|
11
11
|
ifdef::listing-caption[:listing-caption: Лістинг]
|
12
12
|
ifdef::manname-title[:manname-title: Назва]
|
13
13
|
:note-caption: Зауваження
|
14
|
-
|
14
|
+
:part-signifier: Частина
|
15
|
+
:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: Передмова]
|
16
|
-
|
17
|
+
:section-refsig: Підрозділ
|
17
18
|
:table-caption: Таблиця
|
18
19
|
:tip-caption: Підказка
|
19
20
|
:toc-title: Зміст
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: 附录
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: 注意
|
5
|
-
//:chapter-
|
6
|
-
//:chapter-refsig: {chapter-
|
5
|
+
//:chapter-signifier: ???
|
6
|
+
//:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: 示例
|
8
8
|
:figure-caption: 图表
|
9
9
|
:important-caption: 重要
|
@@ -11,7 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: 列表]
|
12
12
|
ifdef::manname-title[:manname-title: 名称]
|
13
13
|
:note-caption: 笔记
|
14
|
-
//:part-
|
14
|
+
//:part-signifier: ???
|
15
|
+
//:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: 序言]
|
16
17
|
//:section-refsig: ???
|
17
18
|
:table-caption: 表格
|
@@ -2,8 +2,8 @@
|
|
2
2
|
:appendix-caption: 附錄
|
3
3
|
:appendix-refsig: {appendix-caption}
|
4
4
|
:caution-caption: 注意
|
5
|
-
//:chapter-
|
6
|
-
//:chapter-refsig: {chapter-
|
5
|
+
//:chapter-signifier: ???
|
6
|
+
//:chapter-refsig: {chapter-signifier}
|
7
7
|
:example-caption: 示例
|
8
8
|
:figure-caption: 圖表
|
9
9
|
:important-caption: 重要
|
@@ -11,7 +11,8 @@
|
|
11
11
|
ifdef::listing-caption[:listing-caption: 列表]
|
12
12
|
ifdef::manname-title[:manname-title: 名稱]
|
13
13
|
:note-caption: 筆記
|
14
|
-
//:part-
|
14
|
+
//:part-signifier: ???
|
15
|
+
//:part-refsig: {part-signifier}
|
15
16
|
ifdef::preface-title[:preface-title: 序言]
|
16
17
|
//:section-refsig: ???
|
17
18
|
:table-caption: 表格
|
@@ -37,7 +37,7 @@ textarea{overflow:auto;vertical-align:top}
|
|
37
37
|
table{border-collapse:collapse;border-spacing:0}
|
38
38
|
*,*::before,*::after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
|
39
39
|
html,body{font-size:100%}
|
40
|
-
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
40
|
+
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;word-wrap:anywhere;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
|
41
41
|
a:hover{cursor:pointer}
|
42
42
|
img,object,embed{max-width:100%;height:auto}
|
43
43
|
object,embed{height:100%}
|
@@ -52,10 +52,8 @@ img{-ms-interpolation-mode:bicubic}
|
|
52
52
|
img,object,svg{display:inline-block;vertical-align:middle}
|
53
53
|
textarea{height:auto;min-height:50px}
|
54
54
|
select{width:100%}
|
55
|
-
.center{margin-left:auto;margin-right:auto}
|
56
|
-
.stretch{width:100%}
|
57
55
|
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
|
58
|
-
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0
|
56
|
+
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0}
|
59
57
|
a{color:#2156a5;text-decoration:underline;line-height:inherit}
|
60
58
|
a:hover,a:focus{color:#1d4b8f}
|
61
59
|
a img{border:0}
|
@@ -103,11 +101,14 @@ table tr.even,table tr.alt{background:#f8f8f7}
|
|
103
101
|
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
|
104
102
|
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
|
105
103
|
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
|
104
|
+
.center{margin-left:auto;margin-right:auto}
|
105
|
+
.stretch{width:100%}
|
106
106
|
.clearfix::before,.clearfix::after,.float-group::before,.float-group::after{content:" ";display:table}
|
107
107
|
.clearfix::after,.float-group::after{clear:both}
|
108
|
-
:not(pre)
|
109
|
-
:not(pre)
|
110
|
-
:not(pre)
|
108
|
+
:not(pre).nobreak{word-wrap:normal}
|
109
|
+
:not(pre).nowrap{white-space:nowrap}
|
110
|
+
:not(pre).pre-wrap{white-space:pre-wrap}
|
111
|
+
:not(pre):not([class^=L])>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed}
|
111
112
|
pre{color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;line-height:1.45;text-rendering:optimizeSpeed}
|
112
113
|
pre code,pre pre{color:inherit;font-size:inherit;line-height:inherit}
|
113
114
|
pre>code{display:block}
|
@@ -172,7 +173,7 @@ body.toc2.toc-right{padding-left:0;padding-right:20em}}
|
|
172
173
|
#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
|
173
174
|
#content #toc>:first-child{margin-top:0}
|
174
175
|
#content #toc>:last-child{margin-bottom:0}
|
175
|
-
#footer{max-width:
|
176
|
+
#footer{max-width:none;background:rgba(0,0,0,.8);padding:1.25em}
|
176
177
|
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
|
177
178
|
#content{margin-bottom:.625em}
|
178
179
|
.sect1{padding-bottom:.625em}
|
@@ -205,7 +206,7 @@ table.tableblock #preamble>.sectionbody>[class="paragraph"]:first-of-type p{font
|
|
205
206
|
.sidebarblock>:last-child{margin-bottom:0}
|
206
207
|
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
|
207
208
|
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
|
208
|
-
.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;
|
209
|
+
.literalblock pre,.listingblock>.content>pre{-webkit-border-radius:4px;border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
|
209
210
|
@media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
|
210
211
|
@media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
|
211
212
|
.literalblock pre,.listingblock>.content>pre:not(.highlight),.listingblock>.content>pre[class="highlight"],.listingblock>.content>pre[class^="highlight "]{background:#f7f7f8}
|
@@ -251,21 +252,21 @@ pre.pygments .lineno::before{content:"";margin-right:-.125em}
|
|
251
252
|
.quoteblock.excerpt,.quoteblock .quoteblock{margin-left:0}
|
252
253
|
.quoteblock.excerpt blockquote,.quoteblock.excerpt p,.quoteblock .quoteblock blockquote,.quoteblock .quoteblock p{color:inherit;font-size:1.0625rem}
|
253
254
|
.quoteblock.excerpt .attribution,.quoteblock .quoteblock .attribution{color:inherit;text-align:left;margin-right:0}
|
254
|
-
table.tableblock{max-width:100
|
255
|
+
table.tableblock{max-width:100%}
|
255
256
|
p.tableblock:last-child{margin-bottom:0}
|
257
|
+
td.tableblock>.content{margin-bottom:1.25em}
|
256
258
|
td.tableblock>.content>:last-child{margin-bottom:-1.25em}
|
257
|
-
td.tableblock>.content>:last-child.sidebarblock{margin-bottom:0}
|
258
259
|
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
|
259
|
-
table.grid-all
|
260
|
-
table.grid-
|
261
|
-
table.grid-
|
262
|
-
table.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}
|
263
|
-
table.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}
|
264
|
-
table.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}
|
265
|
-
table.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}
|
260
|
+
table.grid-all>*>tr>*{border-width:1px}
|
261
|
+
table.grid-cols>*>tr>*{border-width:0 1px}
|
262
|
+
table.grid-rows>*>tr>*{border-width:1px 0}
|
266
263
|
table.frame-all{border-width:1px}
|
264
|
+
table.frame-ends{border-width:1px 0}
|
267
265
|
table.frame-sides{border-width:0 1px}
|
268
|
-
table.frame-
|
266
|
+
table.frame-none>colgroup+*>:first-child>*,table.frame-sides>colgroup+*>:first-child>*{border-top-width:0}
|
267
|
+
table.frame-none>:last-child>:last-child>*,table.frame-sides>:last-child>:last-child>*{border-bottom-width:0}
|
268
|
+
table.frame-none>*>tr>:first-child,table.frame-ends>*>tr>:first-child{border-left-width:0}
|
269
|
+
table.frame-none>*>tr>:last-child,table.frame-ends>*>tr>:last-child{border-right-width:0}
|
269
270
|
table.stripes-all tr,table.stripes-odd tr:nth-of-type(odd),table.stripes-even tr:nth-of-type(even),table.stripes-hover tr:hover{background:#f8f8f7}
|
270
271
|
th.halign-left,td.halign-left{text-align:left}
|
271
272
|
th.halign-right,td.halign-right{text-align:right}
|
@@ -375,7 +376,7 @@ a span.icon>.fa{cursor:inherit}
|
|
375
376
|
.admonitionblock td.icon .icon-warning::before{content:"\f071";color:#bf6900}
|
376
377
|
.admonitionblock td.icon .icon-caution::before{content:"\f06d";color:#bf3400}
|
377
378
|
.admonitionblock td.icon .icon-important::before{content:"\f06a";color:#bf0000}
|
378
|
-
.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:
|
379
|
+
.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
|
379
380
|
.conum[data-value] *{color:#fff!important}
|
380
381
|
.conum[data-value]+b{display:none}
|
381
382
|
.conum[data-value]::after{content:attr(data-value)}
|
@@ -402,6 +403,7 @@ thead{display:table-header-group}
|
|
402
403
|
svg{max-width:100%}
|
403
404
|
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
|
404
405
|
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
|
406
|
+
#header,#content,#footnotes,#footer{max-width:none}
|
405
407
|
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
|
406
408
|
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
|
407
409
|
body.book #header{text-align:center}
|
data/lib/asciidoctor.rb
CHANGED
@@ -148,7 +148,7 @@ module Asciidoctor
|
|
148
148
|
# Compliance value: 'drop-line'
|
149
149
|
define :attribute_missing, 'skip'
|
150
150
|
|
151
|
-
# AsciiDoc drops lines that contain an attribute
|
151
|
+
# AsciiDoc drops lines that contain an attribute unassignment.
|
152
152
|
# This behavior may need to be tuned depending on the circumstances.
|
153
153
|
# Compliance value: 'drop-line'
|
154
154
|
define :attribute_undefined, 'drop-line'
|
@@ -296,7 +296,7 @@ module Asciidoctor
|
|
296
296
|
DELIMITED_BLOCK_TAILS = {}.tap {|accum| DELIMITED_BLOCKS.each_key {|k| accum[k] = k[k.length - 1] if k.length == 4 } }
|
297
297
|
|
298
298
|
# NOTE the 'figure' key as a string is historical and used by image blocks
|
299
|
-
|
299
|
+
CAPTION_ATTRIBUTE_NAMES = { example: 'example-caption', 'figure' => 'figure-caption', listing: 'listing-caption', table: 'table-caption' }
|
300
300
|
|
301
301
|
LAYOUT_BREAK_CHARS = {
|
302
302
|
'\'' => :thematic_break,
|
@@ -357,9 +357,35 @@ module Asciidoctor
|
|
357
357
|
|
358
358
|
FONT_AWESOME_VERSION = '4.7.0'
|
359
359
|
|
360
|
-
HIGHLIGHT_JS_VERSION = '9.
|
361
|
-
|
362
|
-
MATHJAX_VERSION = '2.7.
|
360
|
+
HIGHLIGHT_JS_VERSION = '9.18.3'
|
361
|
+
|
362
|
+
MATHJAX_VERSION = '2.7.9'
|
363
|
+
|
364
|
+
DEFAULT_ATTRIBUTES = {
|
365
|
+
'appendix-caption' => 'Appendix',
|
366
|
+
'appendix-refsig' => 'Appendix',
|
367
|
+
'caution-caption' => 'Caution',
|
368
|
+
'chapter-refsig' => 'Chapter',
|
369
|
+
#'encoding' => 'UTF-8',
|
370
|
+
'example-caption' => 'Example',
|
371
|
+
'figure-caption' => 'Figure',
|
372
|
+
'important-caption' => 'Important',
|
373
|
+
'last-update-label' => 'Last updated',
|
374
|
+
#'listing-caption' => 'Listing',
|
375
|
+
'note-caption' => 'Note',
|
376
|
+
'part-refsig' => 'Part',
|
377
|
+
#'preface-title' => 'Preface',
|
378
|
+
'prewrap' => '',
|
379
|
+
'sectids' => '',
|
380
|
+
'section-refsig' => 'Section',
|
381
|
+
'table-caption' => 'Table',
|
382
|
+
'tip-caption' => 'Tip',
|
383
|
+
'toc-placement' => 'auto',
|
384
|
+
'toc-title' => 'Table of Contents',
|
385
|
+
'untitled-label' => 'Untitled',
|
386
|
+
'version-label' => 'Version',
|
387
|
+
'warning-caption' => 'Warning',
|
388
|
+
}
|
363
389
|
|
364
390
|
# attributes which be changed throughout the flow of the document (e.g., sectnums)
|
365
391
|
FLEXIBLE_ATTRIBUTES = ['sectnums']
|
@@ -511,8 +537,8 @@ module Asciidoctor
|
|
511
537
|
end unless RUBY_ENGINE == 'opal'
|
512
538
|
|
513
539
|
unless RUBY_ENGINE == 'opal'
|
514
|
-
autoload :SyntaxHighlighter, %(#{
|
515
|
-
autoload :Timings, %(#{
|
540
|
+
autoload :SyntaxHighlighter, %(#{__dir__}/asciidoctor/syntax_highlighter)
|
541
|
+
autoload :Timings, %(#{__dir__}/asciidoctor/timings)
|
516
542
|
end
|
517
543
|
end
|
518
544
|
|
@@ -141,6 +141,11 @@ class AbstractBlock < AbstractNode
|
|
141
141
|
(Integer @numeral) rescue @numeral
|
142
142
|
end
|
143
143
|
|
144
|
+
# Deprecated: Legacy property to set the numeral of this section by coercing the value to a String.
|
145
|
+
def number= val
|
146
|
+
@numeral = val.to_s
|
147
|
+
end
|
148
|
+
|
144
149
|
# Public: Walk the document tree and find all block-level nodes that match the specified selector (context, style, id,
|
145
150
|
# role, and/or custom filter).
|
146
151
|
#
|
@@ -338,17 +343,17 @@ class AbstractBlock < AbstractNode
|
|
338
343
|
if (val = reftext) && !val.empty?
|
339
344
|
val
|
340
345
|
# NOTE xrefstyle only applies to blocks with a title and a caption or number
|
341
|
-
elsif xrefstyle && @title &&
|
346
|
+
elsif xrefstyle && @title && !@caption.nil_or_empty?
|
342
347
|
case xrefstyle
|
343
348
|
when 'full'
|
344
349
|
quoted_title = sub_placeholder (sub_quotes @document.compat_mode ? %q(``%s'') : '"`%s`"'), title
|
345
|
-
if @numeral && (caption_attr_name =
|
350
|
+
if @numeral && (caption_attr_name = CAPTION_ATTRIBUTE_NAMES[@context]) && (prefix = @document.attributes[caption_attr_name])
|
346
351
|
%(#{prefix} #{@numeral}, #{quoted_title})
|
347
352
|
else
|
348
353
|
%(#{@caption.chomp '. '}, #{quoted_title})
|
349
354
|
end
|
350
355
|
when 'short'
|
351
|
-
if @numeral && (caption_attr_name =
|
356
|
+
if @numeral && (caption_attr_name = CAPTION_ATTRIBUTE_NAMES[@context]) && (prefix = @document.attributes[caption_attr_name])
|
352
357
|
%(#{prefix} #{@numeral})
|
353
358
|
else
|
354
359
|
@caption.chomp '. '
|
@@ -380,7 +385,7 @@ class AbstractBlock < AbstractNode
|
|
380
385
|
# Returns nothing.
|
381
386
|
def assign_caption value, caption_context = @context
|
382
387
|
unless @caption || !@title || (@caption = value || @document.attributes['caption'])
|
383
|
-
if (attr_name =
|
388
|
+
if (attr_name = CAPTION_ATTRIBUTE_NAMES[caption_context]) && (prefix = @document.attributes[attr_name])
|
384
389
|
@caption = %(#{prefix} #{@numeral = @document.increment_and_store_counter %(#{caption_context}-number), self}. )
|
385
390
|
nil
|
386
391
|
end
|
@@ -65,7 +65,7 @@ class AbstractNode
|
|
65
65
|
#
|
66
66
|
# parent - The Block to set as the parent of this Block
|
67
67
|
#
|
68
|
-
# Returns the
|
68
|
+
# Returns the value of the parent argument
|
69
69
|
def parent= parent
|
70
70
|
@parent, @document = parent, parent.document
|
71
71
|
end
|
@@ -216,6 +216,15 @@ class AbstractNode
|
|
216
216
|
(val = @attributes['role']) ? (%( #{val} ).include? %( #{name} )) : false
|
217
217
|
end
|
218
218
|
|
219
|
+
# Public: Sets the value of the role attribute on this ndoe.
|
220
|
+
#
|
221
|
+
# names - A single role name, a space-separated String of role names, or an Array of role names
|
222
|
+
#
|
223
|
+
# Returns the value of the names argument
|
224
|
+
def role= names
|
225
|
+
@attributes['role'] = (::Array === names) ? (names.join ' ') : names
|
226
|
+
end
|
227
|
+
|
219
228
|
# Public: Adds the given role directly to this node.
|
220
229
|
#
|
221
230
|
# Returns a [Boolean] indicating whether the role was added.
|
@@ -514,6 +523,7 @@ class AbstractNode
|
|
514
523
|
# * :normalize a Boolean that indicates whether the data should be normalized (default: false)
|
515
524
|
# * :start the String relative base path to use when resolving the target (default: nil)
|
516
525
|
# * :warn_on_failure a Boolean that indicates whether warnings are issued if the target cannot be read (default: true)
|
526
|
+
# * :warn_if_empty a Boolean that indicates whether a warning is issued if contents of target is empty (default: false)
|
517
527
|
# Returns the contents of the resolved target or nil if the resolved target cannot be read
|
518
528
|
# --
|
519
529
|
# TODO refactor other methods in this class to use this method were possible (repurposing if necessary)
|
@@ -525,22 +535,22 @@ class AbstractNode
|
|
525
535
|
Helpers.require_library 'open-uri/cached', 'open-uri-cached' if doc.attr? 'cache-uri'
|
526
536
|
begin
|
527
537
|
if opts[:normalize]
|
528
|
-
(Helpers.prepare_source_string ::OpenURI.open_uri(target, URI_READ_MODE) {|f| f.read }).join LF
|
538
|
+
contents = (Helpers.prepare_source_string ::OpenURI.open_uri(target, URI_READ_MODE) {|f| f.read }).join LF
|
529
539
|
else
|
530
|
-
::OpenURI.open_uri(target, URI_READ_MODE) {|f| f.read }
|
540
|
+
contents = ::OpenURI.open_uri(target, URI_READ_MODE) {|f| f.read }
|
531
541
|
end
|
532
542
|
rescue
|
533
543
|
logger.warn %(could not retrieve contents of #{opts[:label] || 'asset'} at URI: #{target}) if opts.fetch :warn_on_failure, true
|
534
|
-
return
|
535
544
|
end
|
536
545
|
else
|
537
546
|
logger.warn %(cannot retrieve contents of #{opts[:label] || 'asset'} at URI: #{target} (allow-uri-read attribute not enabled)) if opts.fetch :warn_on_failure, true
|
538
|
-
return
|
539
547
|
end
|
540
548
|
else
|
541
549
|
target = normalize_system_path target, opts[:start], nil, target_name: (opts[:label] || 'asset')
|
542
|
-
read_asset target, normalize: opts[:normalize], warn_on_failure: (opts.fetch :warn_on_failure, true), label: opts[:label]
|
550
|
+
contents = read_asset target, normalize: opts[:normalize], warn_on_failure: (opts.fetch :warn_on_failure, true), label: opts[:label]
|
543
551
|
end
|
552
|
+
logger.warn %(contents of #{opts[:label] || 'asset'} is empty: #{target}) if contents && opts[:warn_if_empty] && contents.empty?
|
553
|
+
contents
|
544
554
|
end
|
545
555
|
|
546
556
|
# Deprecated: Check whether the specified String is a URI by
|