asciidoctor 2.0.18 → 2.0.23

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: c415cde38b385b114b0de056cfc4235c6fbfdc0a0b189a7479c477ec4265e72a
4
- data.tar.gz: cf171969c86a19aa9e846751564baf362e1d9fd2ab927c63f8f017c0f8de039e
3
+ metadata.gz: 3b1c9cee03ccdf7fcc1d1aee9e9d934863d55065c673781d6113d93627ba16de
4
+ data.tar.gz: 582869ca4932e3b58d9ed0c45a7bb2f555a660e0b691090858768f0353be036a
5
5
  SHA512:
6
- metadata.gz: 4a1e07e2a597d176326d8547cebaf2424e43ba861912502f7e544a2ce74fab3567c9b1f9e87061c6586d7bfa1c1dbde764b7c50b7a3746f7b8548426f165c9f5
7
- data.tar.gz: fb5b41022b045dd1ad09f09b5ffd98a512958186388ea1182d96c32367723925718ba49abe7dbaea84bf0c051a3121302a33bf0e302f5d1f25ca3068ba210be4
6
+ metadata.gz: 0757a8709e9278d7f5a6eaf0fdfd55001a336f110cad837ebdb2bf2918c9288703d9f4073ebb7e88ffd76532f8472c250191c7a81a0a821f055ac55b4d5e5965
7
+ data.tar.gz: 2ff7be04f59f2431d5d0da01c5fe792d089f1a53c72f6a166c3e6dd274ff17eddebcc39c66d4479047885033da48798c125906d3c7453dd950d60751d04d271f
data/CHANGELOG.adoc CHANGED
@@ -1,21 +1,144 @@
1
1
  = Asciidoctor Changelog
2
- :uri-asciidoctor: https://asciidoctor.org
3
- :uri-asciidoc: {uri-asciidoctor}/docs/what-is-asciidoc
4
- :uri-repo: https://github.com/asciidoctor/asciidoctor
2
+ :url-asciidoctor: https://asciidoctor.org
3
+ :url-asciidoc: https://docs.asciidoctor.org/asciidoc/latest/
4
+ :url-repo: https://github.com/asciidoctor/asciidoctor
5
5
  :icons: font
6
6
  :star: icon:star[role=red]
7
7
  ifndef::icons[]
8
8
  :star: ★
9
9
  endif::[]
10
10
 
11
- {uri-asciidoctor}[Asciidoctor] is a _fast_, open source text processor and publishing toolchain for converting {uri-asciidoc}[AsciiDoc] content into HTML 5, DocBook 5, and other formats.
11
+ {url-asciidoctor}[Asciidoctor] is a _fast_, open source text processor and publishing toolchain for converting {url-asciidoc}[AsciiDoc] content into HTML 5, DocBook 5, and other formats.
12
12
 
13
13
  This document provides a high-level view of the changes introduced in Asciidoctor by release.
14
- For an even more detailed look at what has changed, refer to the {uri-repo}/commits/[commit history] on GitHub.
14
+ For an even more detailed look at what has changed, refer to the {url-repo}/commits/[commit history] on GitHub.
15
15
 
16
16
  This project utilizes semantic versioning.
17
17
 
18
18
  // tag::compact[]
19
+ == 2.0.23 (2024-05-17) - @mojavelinux
20
+
21
+ Compliance::
22
+
23
+ * Encode spaces in mailto links as %20, in accordance with RFC 3986, instead of + (#4576)
24
+
25
+ Improvements::
26
+
27
+ * Log error when an incomplete row is detected at the end of a table (#4573)
28
+
29
+ Bug Fixes::
30
+
31
+ * Don't leave behind empty line inside skipped preprocessor conditional (#4580)
32
+ * Don't duplicate block attribute line above detached block that breaks a dlist; fixes duplicate role on detached block (#4565)
33
+ * Don't crash when parsing xref shorthand if target starts with URL protocol and text is offset by space (#4570)
34
+ * Only drop current row if colspan of last cell exceeds specified number of columns (#4587)
35
+ * Drop last row if colspan of last cell in table exceeds specified number of columns (#4587)
36
+ * Preserve repeating spaces in verbatim content in manpage output (#3583)
37
+
38
+ === Details
39
+
40
+ {url-repo}/releases/tag/v2.0.23[git tag] | {url-repo}/compare/v2.0.22\...v2.0.23[full diff]
41
+ // end::compact[]
42
+
43
+ == 2.0.22 (2024-03-08) - @mojavelinux
44
+
45
+ Improvements::
46
+
47
+ * Set `cloaked-context` attribute on source block when context is not `:listing` (#4556)
48
+
49
+ Compliance::
50
+
51
+ * Remove use of base64 library to prevent warning in Ruby >= 3.3 (#4561)
52
+
53
+ === Details
54
+
55
+ {url-repo}/releases/tag/v2.0.22[git tag] | {url-repo}/compare/v2.0.21\...v2.0.22[full diff]
56
+
57
+ == 2.0.21 (2024-02-20) - @mojavelinux
58
+
59
+ Compliance::
60
+
61
+ * Turn off system-dependent newline conversion when writing files; don't convert line feeds to system-dependent newline (#4550)
62
+ * Support logger in Ruby 3.3 by instantiating super class (#4493) (*@mtasaka*)
63
+ * Add support for `scaledwidth` and `scale` attributes on inline image macro in DocBook output (#4552)
64
+ * Update latest Ruby to 3.3 in CI workflows
65
+
66
+ Improvements::
67
+
68
+ * Change title to doctitle in warning message about use of abstract to make subject more clear
69
+ * Modify default stylesheet to add text decoration to active footnote number link in footnotes list (#4530) (@Larhzu)
70
+
71
+ Bug Fixes::
72
+
73
+ * Nested dlist attached using list continuation should not consume detached paragraph (#3535)
74
+ * Don't break nested dlist with attached block if offset from parent list by empty line (#3693)
75
+ * Preserve paragraph breaks in normal table cell in manpage output (#4481)
76
+ * Style cells in head row as bold in manpage output (#4490)
77
+ * Escape spaces in include target (using inline passthrough) when generating link from include directive (#4461)
78
+ * Move abstract inside info tag in DocBook output (#3602)
79
+ * Honor secondary and tertiary terms on `indexterm` macro when primary term is quoted and contains an equals sign (#3652)
80
+ * Remove extra border below doctitle when sidebar toc is collapsed into main content area (#4523)
81
+ * Treat bare URL enclosed in angle brackets as unconstrained syntax; only match until closing angled bracket (#4468)
82
+ * Allow URL enclosed in angled brackets syntax to be escaped using backslash (#4468)
83
+
84
+ === Details
85
+
86
+ {url-repo}/releases/tag/v2.0.21[git tag] | {url-repo}/compare/v2.0.20\...v2.0.21[full diff]
87
+
88
+ == 2.0.20 (2023-05-18) - @mojavelinux
89
+
90
+ Bug Fixes::
91
+
92
+ * Update `release-version` attribute in READMEs and man page during release
93
+ * Rebuild man page during release
94
+
95
+ === Details
96
+
97
+ {url-repo}/releases/tag/v2.0.20[git tag] | {url-repo}/compare/v2.0.19\...v2.0.20[full diff]
98
+
99
+ == 2.0.19 (2023-05-17) - @mojavelinux
100
+
101
+ Improvements::
102
+
103
+ * Return empty string instead of nil if raw or verbatim block has no lines
104
+ * Don't uppercase monospace span in section title in manpage output (#4402)
105
+ * Simplify processing of implicit link (i.e., autolink) by separating implicit and explicit match
106
+ * Generate partintro block consistently (#4450)
107
+ * Add Kiswahili translation for built-in labels (PR #4454) (*@bkmgit*)
108
+
109
+ Compliance::
110
+
111
+ * Fix call order so use of an include file with invalid encoding continues to raise error when using Ruby >= 3.2.0
112
+ * Fix test assertion for fallback Rouge stylesheet to be compatible with Rouge 4.1 (#4406) (*@tmzullinger*)
113
+ * Support `notitle` option on section as alternative to `untitled` to hide title (#4437)
114
+ * Add support for Haml 6 to template converter (#4429)
115
+
116
+ Bug Fixes::
117
+
118
+ * Process constrained inline passthrough inside monospace span (#4458)
119
+ * Catalog inline ref defined using anchor macro even when resolved reftext is empty
120
+ * Use while loop rather than recursion to locate next line to process; prevents stack limit error (#4368)
121
+ * Avoid matching numeric character references when searching for # in xref target (#4393)
122
+ * Use correct selector to collapse margin on first and last child of sidebar
123
+ * Don't allow target of include directive to start with a space (to distinguish it from a dlist item) or to end with a space
124
+ * Manify alt text of block image in manpage output (#4401)
125
+ * Adjust font size of term in horizontal dlist to match font size of term in regular dlist
126
+ * Implicitly attach nested list that starts with block attribute lines to dlist entry (#4268)
127
+ * Don't swallow square brackets when processing escaped URL macro
128
+ * Treat `uri:classloader:` as an absolute path prefix when running on JRuby (#3929)
129
+ * Apply reftext substitutions to value of `mantitle` attribute in DocBook output (#4448)
130
+ * Enclose `<reftext>` tag in `<article>` tag in DocBook output for man page (#4452)
131
+ * Correctly handle compat role on monospace and constrained passthrough when box attrlist or formatted text is escaped
132
+
133
+ Build / Infrastructure::
134
+
135
+ * Update latest CRuby in CI workflow to 3.2
136
+ * Update latest JRuby in CI workflow to 9.4.2.0
137
+
138
+ === Details
139
+
140
+ {url-repo}/releases/tag/v2.0.19[git tag] | {url-repo}/compare/v2.0.18\...v2.0.19[full diff]
141
+
19
142
  == 2.0.18 (2022-10-15) - @mojavelinux
20
143
 
21
144
  Improvements::
@@ -38,8 +161,7 @@ Bug Fixes::
38
161
 
39
162
  === Details
40
163
 
41
- {url-repo}/releases/tag/v2.0.18[git tag] | {url-repo}/compare/v2.0.17\...v2.0.18[source diff]
42
- // end::compact[]
164
+ {url-repo}/releases/tag/v2.0.18[git tag] | {url-repo}/compare/v2.0.17\...v2.0.18[full diff]
43
165
 
44
166
  == 2.0.17 (2022-01-05) - @mojavelinux
45
167
 
data/README-de.adoc CHANGED
@@ -1,5 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
+ v2.0.23, 2024-05-17
3
4
  // settings:
4
5
  :idprefix:
5
6
  :idseparator: -
@@ -15,7 +16,7 @@ ifdef::env-github[]
15
16
  :warning-caption: :warning:
16
17
  endif::[]
17
18
  // Variables:
18
- :release-version: 2.0.17
19
+ :release-version: 2.0.23
19
20
  // URIs:
20
21
  :uri-org: https://github.com/asciidoctor
21
22
  :uri-repo: {uri-org}/asciidoctor
data/README-fr.adoc CHANGED
@@ -1,5 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
+ v2.0.23, 2024-05-17
3
4
  // settings:
4
5
  :idprefix:
5
6
  :idseparator: -
@@ -15,7 +16,7 @@ ifdef::env-github[]
15
16
  :warning-caption: :warning:
16
17
  endif::[]
17
18
  // Variables:
18
- :release-version: 2.0.17
19
+ :release-version: 2.0.23
19
20
  // URIs:
20
21
  :uri-org: https://github.com/asciidoctor
21
22
  :uri-repo: {uri-org}/asciidoctor
data/README-jp.adoc CHANGED
@@ -1,5 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
+ v2.0.23, 2024-05-17
3
4
  // settings:
4
5
  :idprefix:
5
6
  :idseparator: -
@@ -15,7 +16,7 @@ ifdef::env-github[]
15
16
  :warning-caption: :warning:
16
17
  endif::[]
17
18
  // Variables:
18
- :release-version: 2.0.17
19
+ :release-version: 2.0.23
19
20
  // URIs:
20
21
  :uri-org: https://github.com/asciidoctor
21
22
  :uri-repo: {uri-org}/asciidoctor
data/README-zh_CN.adoc CHANGED
@@ -1,5 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
+ v2.0.23, 2024-05-17
3
4
  // settings:
4
5
  :page-layout: base
5
6
  :idprefix:
@@ -16,7 +17,7 @@ ifdef::env-github[]
16
17
  :warning-caption: :warning:
17
18
  endif::[]
18
19
  // Variables:
19
- :release-version: 2.0.17
20
+ :release-version: 2.0.23
20
21
  // URIs:
21
22
  :uri-org: https://github.com/asciidoctor
22
23
  :uri-repo: {uri-org}/asciidoctor
data/README.adoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Asciidoctor
2
2
  Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
- v2.0.18, 2022-10-15
3
+ v2.0.23, 2024-05-17
4
4
  // settings:
5
5
  :idprefix:
6
6
  :idseparator: -
@@ -16,7 +16,7 @@ ifdef::env-github[]
16
16
  :warning-caption: :warning:
17
17
  endif::[]
18
18
  // Variables:
19
- :release-version: 2.0.17
19
+ :release-version: 2.0.23
20
20
  // URLs:
21
21
  :url-org: https://github.com/asciidoctor
22
22
  :url-repo: {url-org}/asciidoctor
@@ -130,20 +130,22 @@ If you're using AsciiDoc.py, see {url-docs}/asciidoctor/latest/migrate/asciidoc-
130
130
 
131
131
  Asciidoctor works on Linux, macOS and Windows and requires one of the following implementations of {url-ruby}[Ruby]:
132
132
 
133
- * CRuby (aka MRI) 2.3 - 3.0
134
- * JRuby 9.1 - 9.2
133
+ * CRuby (aka MRI) 2.3 - 3.3
134
+ * JRuby 9.1 - 9.4
135
135
  * TruffleRuby (GraalVM)
136
136
 
137
137
  [CAUTION]
138
138
  ====
139
139
  If you're using a non-English Windows environment, you may bump into an `Encoding::UndefinedConversionError` when invoking Asciidoctor.
140
- To solve this issue, we recommend changing the active code page in your console to UTF-8:
140
+ To solve this issue, we recommend overriding the default external and internal character encodings to `utf-8`.
141
+ You can do so by setting the `RUBYOPT` environment variable as follows:
141
142
 
142
- chcp 65001
143
+ RUBYOPT="-E utf-8:utf-8"
144
+
145
+ Once you make this change, all your Unicode headaches should be behind you.
143
146
 
144
- Once you make this change, all your Unicode headaches will be behind you.
145
147
  If you're using an IDE like Eclipse, make sure you set the encoding to UTF-8 there as well.
146
- Asciidoctor works best when you use UTF-8 everywhere.
148
+ Asciidoctor is optimized to work with UTF-8 as the default encoding.
147
149
  ====
148
150
 
149
151
  == Installation
data/asciidoctor.gemspec CHANGED
@@ -38,9 +38,9 @@ Gem::Specification.new do |s|
38
38
  s.add_development_dependency 'cucumber', '~> 3.1.0'
39
39
  # erubi is needed for testing alternate eRuby impls
40
40
  s.add_development_dependency 'erubi', '~> 1.10.0'
41
- s.add_development_dependency 'haml', '~> 5.2.0'
42
- s.add_development_dependency 'minitest', '~> 5.14.0'
43
- s.add_development_dependency 'nokogiri', '~> 1.10.0'
41
+ s.add_development_dependency 'haml', '~> 6.1.0'
42
+ s.add_development_dependency 'minitest', '~> 5.22.0'
43
+ s.add_development_dependency 'nokogiri', '~> 1.13.0'
44
44
  s.add_development_dependency 'rake', '~> 12.3.0'
45
45
  s.add_development_dependency 'slim', '~> 4.1.0'
46
46
  s.add_development_dependency 'tilt', '~> 2.0.0'
@@ -0,0 +1,23 @@
1
+ // Kiswahili translation, Benson Muite
2
+ :appendix-caption: Kiambatisho
3
+ :appendix-refsig: {appendix-caption}
4
+ :caution-caption: Hatari
5
+ :chapter-signifier: Somo
6
+ :chapter-refsig: {chapter-signifier}
7
+ :example-caption: Mfano
8
+ :figure-caption: Picha
9
+ :important-caption: Muhimu
10
+ :last-update-label: Geuza la mwisho
11
+ ifdef::listing-caption[:listing-caption: Orodha]
12
+ ifdef::manname-title[:manname-title: Jina]
13
+ :note-caption: Muhtasari
14
+ :part-signifier: Sehemu
15
+ :part-refsig: {part-signifier}
16
+ ifdef::preface-title[:preface-title: Dibaji]
17
+ :section-refsig: Fungu
18
+ :table-caption: Ratiba
19
+ :tip-caption: Shauri
20
+ :toc-title: Fahirisi
21
+ :untitled-label: Bila kichwa
22
+ :version-label: Toleo
23
+ :warning-caption: Onyo
@@ -112,7 +112,7 @@ Attach a block or paragraph to a list item using a list continuation (which you
112
112
 
113
113
  .Some Authors
114
114
  [circle]
115
- - Edgar Allen Poe
115
+ - Edgar Allan Poe
116
116
  - Sheri S. Tepper
117
117
  - Bill Bryson
118
118
 
@@ -130,7 +130,7 @@ p a>code:hover{color:rgba(0,0,0,.9)}
130
130
  #content::before{content:none}
131
131
  #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
132
132
  #header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #dddddf}
133
- #header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
133
+ #header>h1:only-child{border-bottom:1px solid #dddddf;padding-bottom:8px}
134
134
  #header .details{border-bottom:1px solid #dddddf;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:flex;flex-flow:row wrap}
135
135
  #header .details span:first-child{margin-left:-.125em}
136
136
  #header .details span.email a{color:rgba(0,0,0,.85)}
@@ -152,6 +152,7 @@ p a>code:hover{color:rgba(0,0,0,.9)}
152
152
  #toctitle{color:#7a2518;font-size:1.2em}
153
153
  @media screen and (min-width:768px){#toctitle{font-size:1.375em}
154
154
  body.toc2{padding-left:15em;padding-right:0}
155
+ body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #dddddf;padding-bottom:8px}
155
156
  #toc.toc2{margin-top:0!important;background:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #e7e7e9;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
156
157
  #toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
157
158
  #toc.toc2>ul{font-size:.9em;margin-bottom:0}
@@ -198,13 +199,10 @@ table.tableblock.fit-content>caption.title{white-space:nowrap;width:0}
198
199
  .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere}
199
200
  .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
200
201
  .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
201
- .exampleblock>.content>:first-child{margin-top:0}
202
- .exampleblock>.content>:last-child{margin-bottom:0}
203
202
  .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
204
- .sidebarblock>:first-child{margin-top:0}
205
- .sidebarblock>:last-child{margin-bottom:0}
206
203
  .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
207
- .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}
204
+ .exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
205
+ .exampleblock>.content>:last-child,.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,.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
206
  .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
209
207
  @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}}
210
208
  @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}}
@@ -320,7 +318,7 @@ a.image{text-decoration:none;display:inline-block}
320
318
  a.image object{pointer-events:none}
321
319
  sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
322
320
  sup.footnote a,sup.footnoteref a{text-decoration:none}
323
- sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
321
+ sup.footnote a:active,sup.footnoteref a:active,#footnotes .footnote a:first-of-type:active{text-decoration:underline}
324
322
  #footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
325
323
  #footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em;border-width:1px 0 0}
326
324
  #footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;margin-bottom:.2em}
@@ -383,7 +381,7 @@ b.conum *{color:inherit!important}
383
381
  dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
384
382
  h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
385
383
  p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
386
- p,blockquote,dt,td.content,span.alt,summary{font-size:1.0625rem}
384
+ p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
387
385
  p{margin-bottom:1.25rem}
388
386
  .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
389
387
  .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc}
@@ -24,6 +24,7 @@ class AbstractBlock < AbstractNode
24
24
  attr_accessor :numeral
25
25
 
26
26
  # Public: Gets/Sets the location in the AsciiDoc source where this block begins.
27
+ # Tracking source location is not enabled by default, and is controlled by the sourcemap option.
27
28
  attr_accessor :source_location
28
29
 
29
30
  # Public: Get/Set the String style (block type qualifier) for this block.
@@ -354,8 +354,8 @@ class AbstractNode
354
354
  #
355
355
  # First, and foremost, the target image path is cleaned if the document safe mode level
356
356
  # is set to at least SafeMode::SAFE (a condition which is true by default) to prevent access
357
- # to ancestor paths in the filesystem. The image data is then read and converted to
358
- # Base64. Finally, a data URI is built which can be used in an image tag.
357
+ # to ancestor paths in the filesystem. The image data is then read and converted to base64.
358
+ # Finally, a data URI is built which can be used in an image tag.
359
359
  #
360
360
  # target_image - A String path to the target image
361
361
  # asset_dir_key - The String attribute key used to lookup the directory where
@@ -376,8 +376,8 @@ class AbstractNode
376
376
  end
377
377
 
378
378
  if ::File.readable? image_path
379
- # NOTE base64 is autoloaded by reference to ::Base64
380
- %(data:#{mimetype};base64,#{::Base64.strict_encode64 ::File.binread image_path})
379
+ # NOTE pack 'm0' is equivalent to Base64.strict_encode64
380
+ %(data:#{mimetype};base64,#{[(::File.binread image_path)].pack 'm0'})
381
381
  else
382
382
  logger.warn %(image to embed not found or not readable: #{image_path})
383
383
  %(data:#{mimetype};base64,)
@@ -410,8 +410,8 @@ class AbstractNode
410
410
 
411
411
  begin
412
412
  mimetype, bindata = ::OpenURI.open_uri(image_uri, URI_READ_MODE) {|f| [f.content_type, f.read] }
413
- # NOTE base64 is autoloaded by reference to ::Base64
414
- %(data:#{mimetype};base64,#{::Base64.strict_encode64 bindata})
413
+ # NOTE pack 'm0' is equivalent to Base64.strict_encode64
414
+ %(data:#{mimetype};base64,#{[bindata].pack 'm0'})
415
415
  rescue
416
416
  logger.warn %(could not retrieve image data from URI: #{image_uri})
417
417
  image_uri
@@ -116,7 +116,7 @@ class Block < AbstractBlock
116
116
  # maybe apply_subs can know how to strip whitespace?
117
117
  result = apply_subs @lines, @subs
118
118
  if result.size < 2
119
- result[0]
119
+ result[0] || ''
120
120
  else
121
121
  result.shift while (first = result[0]) && first.rstrip.empty?
122
122
  result.pop while (last = result[-1]) && last.rstrip.empty?