Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package rubygem-asciidoctor for
openSUSE:Factory checked in at 2023-06-27 23:15:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-asciidoctor (Old)
and /work/SRC/openSUSE:Factory/.rubygem-asciidoctor.new.15902 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-asciidoctor"
Tue Jun 27 23:15:39 2023 rev:11 rq:1095308 version:2.0.20
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-asciidoctor/rubygem-asciidoctor.changes
2022-10-31 10:44:23.896762611 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-asciidoctor.new.15902/rubygem-asciidoctor.changes
2023-06-27 23:15:41.175045431 +0200
@@ -1,0 +2,48 @@
+Wed Jun 21 10:53:45 UTC 2023 - Osama Alrifai <[email protected]>
+
+- update to 2.0.20
+Bug Fixes::
+
+ * Update `release-version` attribute in READMEs and man page during release
+ * Rebuild man page during release
+
+=== Details
+
+{url-repo}/releases/tag/v2.0.20[git tag] |
{url-repo}/compare/v2.0.19\...v2.0.20[full diff]
+// end::compact[]
+
+== 2.0.19 (2023-05-17) - @mojavelinux
+
+Improvements::
+
+ * Return empty string instead of nil if raw or verbatim block has no lines
+ * Don't uppercase monospace span in section title in manpage output (#4402)
+ * Simplify processing of implicit link (i.e., autolink) by separating
implicit and explicit match
+ * Generate partintro block consistently (#4450)
+ * Add Kiswahili translation for built-in labels (PR #4454) (*@bkmgit*)
+
+Compliance::
+
+ * Fix call order so use of an include file with invalid encoding continues
to raise error when using Ruby >= 3.2.0
+ * Fix test assertion for fallback Rouge stylesheet to be compatible with
Rouge 4.1 (#4406) (*@tmzullinger*)
+ * Support `notitle` option on section as alternative to `untitled` to hide
title (#4437)
+ * Add support for Haml 6 to template converter (#4429)
+
+Bug Fixes::
+
+ * Process constrained inline passthrough inside monospace span (#4458)
+ * Catalog inline ref defined using anchor macro even when resolved reftext
is empty
+ * Use while loop rather than recursion to locate next line to process;
prevents stack limit error (#4368)
+ * Avoid matching numeric character references when searching for # in xref
target (#4393)
+ * Use correct selector to collapse margin on first and last child of sidebar
+ * 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
+ * Manify alt text of block image in manpage output (#4401)
+ * Adjust font size of term in horizontal dlist to match font size of term in
regular dlist
+ * Implicitly attach nested list that starts with block attribute lines to
dlist entry (#4268)
+ * Don't swallow square brackets when processing escaped URL macro
+ * Treat `uri:classloader:` as an absolute path prefix when running on JRuby
(#3929)
+ * Apply reftext substitutions to value of `mantitle` attribute in DocBook
output (#4448)
+ * Enclose `<reftext>` tag in `<article>` tag in DocBook output for man page
(#4452)
+ * Correctly handle compat role on monospace and constrained passthrough when
box attrlist or formatted text is escaped
+
+-------------------------------------------------------------------
Old:
----
asciidoctor-2.0.18.gem
New:
----
asciidoctor-2.0.20.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-asciidoctor.spec ++++++
--- /var/tmp/diff_new_pack.8Sk9XN/_old 2023-06-27 23:15:42.159051221 +0200
+++ /var/tmp/diff_new_pack.8Sk9XN/_new 2023-06-27 23:15:42.167051269 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-asciidoctor
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-asciidoctor
-Version: 2.0.18
+Version: 2.0.20
Release: 0
%define mod_name asciidoctor
%define mod_full_name %{mod_name}-%{version}
++++++ asciidoctor-2.0.18.gem -> asciidoctor-2.0.20.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG.adoc new/CHANGELOG.adoc
--- old/CHANGELOG.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/CHANGELOG.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,21 +1,76 @@
= Asciidoctor Changelog
-:uri-asciidoctor: https://asciidoctor.org
-:uri-asciidoc: {uri-asciidoctor}/docs/what-is-asciidoc
-:uri-repo: https://github.com/asciidoctor/asciidoctor
+:url-asciidoctor: https://asciidoctor.org
+:url-asciidoc: https://docs.asciidoctor.org/asciidoc/latest/
+:url-repo: https://github.com/asciidoctor/asciidoctor
:icons: font
:star: icon:star[role=red]
ifndef::icons[]
:star: ★
endif::[]
-{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.
+{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.
This document provides a high-level view of the changes introduced in
Asciidoctor by release.
-For an even more detailed look at what has changed, refer to the
{uri-repo}/commits/[commit history] on GitHub.
+For an even more detailed look at what has changed, refer to the
{url-repo}/commits/[commit history] on GitHub.
This project utilizes semantic versioning.
// tag::compact[]
+== 2.0.20 (2023-05-18) - @mojavelinux
+
+Bug Fixes::
+
+ * Update `release-version` attribute in READMEs and man page during release
+ * Rebuild man page during release
+
+=== Details
+
+{url-repo}/releases/tag/v2.0.20[git tag] |
{url-repo}/compare/v2.0.19\...v2.0.20[full diff]
+// end::compact[]
+
+== 2.0.19 (2023-05-17) - @mojavelinux
+
+Improvements::
+
+ * Return empty string instead of nil if raw or verbatim block has no lines
+ * Don't uppercase monospace span in section title in manpage output (#4402)
+ * Simplify processing of implicit link (i.e., autolink) by separating
implicit and explicit match
+ * Generate partintro block consistently (#4450)
+ * Add Kiswahili translation for built-in labels (PR #4454) (*@bkmgit*)
+
+Compliance::
+
+ * Fix call order so use of an include file with invalid encoding continues
to raise error when using Ruby >= 3.2.0
+ * Fix test assertion for fallback Rouge stylesheet to be compatible with
Rouge 4.1 (#4406) (*@tmzullinger*)
+ * Support `notitle` option on section as alternative to `untitled` to hide
title (#4437)
+ * Add support for Haml 6 to template converter (#4429)
+
+Bug Fixes::
+
+ * Process constrained inline passthrough inside monospace span (#4458)
+ * Catalog inline ref defined using anchor macro even when resolved reftext
is empty
+ * Use while loop rather than recursion to locate next line to process;
prevents stack limit error (#4368)
+ * Avoid matching numeric character references when searching for # in xref
target (#4393)
+ * Use correct selector to collapse margin on first and last child of sidebar
+ * 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
+ * Manify alt text of block image in manpage output (#4401)
+ * Adjust font size of term in horizontal dlist to match font size of term in
regular dlist
+ * Implicitly attach nested list that starts with block attribute lines to
dlist entry (#4268)
+ * Don't swallow square brackets when processing escaped URL macro
+ * Treat `uri:classloader:` as an absolute path prefix when running on JRuby
(#3929)
+ * Apply reftext substitutions to value of `mantitle` attribute in DocBook
output (#4448)
+ * Enclose `<reftext>` tag in `<article>` tag in DocBook output for man page
(#4452)
+ * Correctly handle compat role on monospace and constrained passthrough when
box attrlist or formatted text is escaped
+
+Build / Infrastructure::
+
+ * Update latest CRuby in CI workflow to 3.2
+ * Update latest JRuby in CI workflow to 9.4.2.0
+
+=== Details
+
+{url-repo}/releases/tag/v2.0.19[git tag] |
{url-repo}/compare/v2.0.18\...v2.0.19[full diff]
+
== 2.0.18 (2022-10-15) - @mojavelinux
Improvements::
@@ -38,8 +93,7 @@
=== Details
-{url-repo}/releases/tag/v2.0.18[git tag] |
{url-repo}/compare/v2.0.17\...v2.0.18[source diff]
-// end::compact[]
+{url-repo}/releases/tag/v2.0.18[git tag] |
{url-repo}/compare/v2.0.17\...v2.0.18[full diff]
== 2.0.17 (2022-01-05) - @mojavelinux
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README-de.adoc new/README-de.adoc
--- old/README-de.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-de.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,5 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White
<https://github.com/graphitefriction[@graphitefriction]>
+v2.0.20, 2023-05-18
// settings:
:idprefix:
:idseparator: -
@@ -15,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.17
+:release-version: 2.0.20
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README-fr.adoc new/README-fr.adoc
--- old/README-fr.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-fr.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,5 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White
<https://github.com/graphitefriction[@graphitefriction]>
+v2.0.20, 2023-05-18
// settings:
:idprefix:
:idseparator: -
@@ -15,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.17
+:release-version: 2.0.20
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README-jp.adoc new/README-jp.adoc
--- old/README-jp.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-jp.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,5 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White
<https://github.com/graphitefriction[@graphitefriction]>
+v2.0.20, 2023-05-18
// settings:
:idprefix:
:idseparator: -
@@ -15,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.17
+:release-version: 2.0.20
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README-zh_CN.adoc new/README-zh_CN.adoc
--- old/README-zh_CN.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README-zh_CN.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,5 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White
<https://github.com/graphitefriction[@graphitefriction]>
+v2.0.20, 2023-05-18
// settings:
:page-layout: base
:idprefix:
@@ -16,7 +17,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.17
+:release-version: 2.0.20
// URIs:
:uri-org: https://github.com/asciidoctor
:uri-repo: {uri-org}/asciidoctor
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.adoc new/README.adoc
--- old/README.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/README.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
= Asciidoctor
Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White
<https://github.com/graphitefriction[@graphitefriction]>
-v2.0.18, 2022-10-15
+v2.0.20, 2023-05-18
// settings:
:idprefix:
:idseparator: -
@@ -16,7 +16,7 @@
:warning-caption: :warning:
endif::[]
// Variables:
-:release-version: 2.0.17
+:release-version: 2.0.20
// URLs:
:url-org: https://github.com/asciidoctor
:url-repo: {url-org}/asciidoctor
@@ -130,20 +130,22 @@
Asciidoctor works on Linux, macOS and Windows and requires one of the
following implementations of {url-ruby}[Ruby]:
-* CRuby (aka MRI) 2.3 - 3.0
-* JRuby 9.1 - 9.2
+* CRuby (aka MRI) 2.3 - 3.2
+* JRuby 9.1 - 9.4
* TruffleRuby (GraalVM)
[CAUTION]
====
If you're using a non-English Windows environment, you may bump into an
`Encoding::UndefinedConversionError` when invoking Asciidoctor.
-To solve this issue, we recommend changing the active code page in your
console to UTF-8:
+To solve this issue, we recommend overriding the default external and internal
character encodings to `utf-8`.
+You can do so by setting the `RUBYOPT` environment variable as follows:
- chcp 65001
+ RUBYOPT="-E utf-8:utf-8"
+
+Once you make this change, all your Unicode headaches should be behind you.
-Once you make this change, all your Unicode headaches will be behind you.
If you're using an IDE like Eclipse, make sure you set the encoding to UTF-8
there as well.
-Asciidoctor works best when you use UTF-8 everywhere.
+Asciidoctor is optimized to work with UTF-8 as the default encoding.
====
== Installation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/asciidoctor.gemspec new/asciidoctor.gemspec
--- old/asciidoctor.gemspec 2018-03-20 01:00:00.000000000 +0100
+++ new/asciidoctor.gemspec 2018-03-20 01:00:00.000000000 +0100
@@ -38,9 +38,9 @@
s.add_development_dependency 'cucumber', '~> 3.1.0'
# erubi is needed for testing alternate eRuby impls
s.add_development_dependency 'erubi', '~> 1.10.0'
- s.add_development_dependency 'haml', '~> 5.2.0'
+ s.add_development_dependency 'haml', '~> 6.1.0'
s.add_development_dependency 'minitest', '~> 5.14.0'
- s.add_development_dependency 'nokogiri', '~> 1.10.0'
+ s.add_development_dependency 'nokogiri', '~> 1.13.0'
s.add_development_dependency 'rake', '~> 12.3.0'
s.add_development_dependency 'slim', '~> 4.1.0'
s.add_development_dependency 'tilt', '~> 2.0.0'
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/data/locale/attributes-sw.adoc
new/data/locale/attributes-sw.adoc
--- old/data/locale/attributes-sw.adoc 1970-01-01 01:00:00.000000000 +0100
+++ new/data/locale/attributes-sw.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -0,0 +1,23 @@
+// Kiswahili translation, Benson Muite
+:appendix-caption: Kiambatisho
+:appendix-refsig: {appendix-caption}
+:caution-caption: Hatari
+:chapter-signifier: Somo
+:chapter-refsig: {chapter-signifier}
+:example-caption: Mfano
+:figure-caption: Picha
+:important-caption: Muhimu
+:last-update-label: Geuza la mwisho
+ifdef::listing-caption[:listing-caption: Orodha]
+ifdef::manname-title[:manname-title: Jina]
+:note-caption: Muhtasari
+:part-signifier: Sehemu
+:part-refsig: {part-signifier}
+ifdef::preface-title[:preface-title: Dibaji]
+:section-refsig: Fungu
+:table-caption: Ratiba
+:tip-caption: Shauri
+:toc-title: Fahirisi
+:untitled-label: Bila kichwa
+:version-label: Toleo
+:warning-caption: Onyo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/data/stylesheets/asciidoctor-default.css
new/data/stylesheets/asciidoctor-default.css
--- old/data/stylesheets/asciidoctor-default.css 2018-03-20
01:00:00.000000000 +0100
+++ new/data/stylesheets/asciidoctor-default.css 2018-03-20
01:00:00.000000000 +0100
@@ -198,13 +198,10 @@
.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}
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
.exampleblock>.content{border:1px solid
#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px}
-.exampleblock>.content>:first-child{margin-top:0}
-.exampleblock>.content>:last-child{margin-bottom:0}
.sidebarblock{border:1px solid
#dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px}
-.sidebarblock>:first-child{margin-top:0}
-.sidebarblock>:last-child{margin-bottom:0}
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
-.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}
+.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0}
+.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}
.literalblock
pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em}
@media screen and (min-width:768px){.literalblock
pre,.listingblock>.content>pre{font-size:.90625em}}
@media screen and (min-width:1280px){.literalblock
pre,.listingblock>.content>pre{font-size:1em}}
@@ -383,7 +380,7 @@
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em}
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
-p,blockquote,dt,td.content,span.alt,summary{font-size:1.0625rem}
+p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem}
p{margin-bottom:1.25rem}
.sidebarblock p,.sidebarblock dt,.sidebarblock
td.content,p.tableblock{font-size:1em}
.exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0
1px 4px #e0e0dc}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/abstract_block.rb
new/lib/asciidoctor/abstract_block.rb
--- old/lib/asciidoctor/abstract_block.rb 2018-03-20 01:00:00.000000000
+0100
+++ new/lib/asciidoctor/abstract_block.rb 2018-03-20 01:00:00.000000000
+0100
@@ -24,6 +24,7 @@
attr_accessor :numeral
# Public: Gets/Sets the location in the AsciiDoc source where this block
begins.
+ # Tracking source location is not enabled by default, and is controlled by
the sourcemap option.
attr_accessor :source_location
# Public: Get/Set the String style (block type qualifier) for this block.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/block.rb new/lib/asciidoctor/block.rb
--- old/lib/asciidoctor/block.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/block.rb 2018-03-20 01:00:00.000000000 +0100
@@ -116,7 +116,7 @@
# maybe apply_subs can know how to strip whitespace?
result = apply_subs @lines, @subs
if result.size < 2
- result[0]
+ result[0] || ''
else
result.shift while (first = result[0]) && first.rstrip.empty?
result.pop while (last = result[-1]) && last.rstrip.empty?
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/converter/docbook5.rb
new/lib/asciidoctor/converter/docbook5.rb
--- old/lib/asciidoctor/converter/docbook5.rb 2018-03-20 01:00:00.000000000
+0100
+++ new/lib/asciidoctor/converter/docbook5.rb 2018-03-20 01:00:00.000000000
+0100
@@ -39,11 +39,25 @@
result << ((node.attr? 'sectnumlevels') ? %(<?asciidoc-numbered
maxdepth="#{node.attr 'sectnumlevels'}"?>) : '<?asciidoc-numbered?>') if
node.attr? 'sectnums'
lang_attribute = (node.attr? 'nolang') ? '' : %( xml:lang="#{node.attr
'lang', 'en'}")
if (root_tag_name = node.doctype) == 'manpage'
- root_tag_name = 'refentry'
+ manpage = true
+ root_tag_name = 'article'
end
root_tag_idx = result.size
id = node.id
result << (document_info_tag node) unless node.noheader
+ if manpage
+ result << '<refentry>'
+ result << '<refmeta>'
+ result << %(<refentrytitle>#{node.apply_reftext_subs node.attr
'mantitle'}</refentrytitle>) if node.attr? 'mantitle'
+ result << %(<manvolnum>#{node.attr 'manvolnum'}</manvolnum>) if
node.attr? 'manvolnum'
+ result << %(<refmiscinfo class="source">#{node.attr 'mansource',
' '}</refmiscinfo>)
+ result << %(<refmiscinfo class="manual">#{node.attr 'manmanual',
' '}</refmiscinfo>)
+ result << '</refmeta>'
+ result << '<refnamediv>'
+ result += (node.attr 'mannames').map {|n| %(<refname>#{n}</refname>) }
if node.attr? 'mannames'
+ result << %(<refpurpose>#{node.attr 'manpurpose'}</refpurpose>) if
node.attr? 'manpurpose'
+ result << '</refnamediv>'
+ end
unless (docinfo_content = node.docinfo :header).empty?
result << docinfo_content
end
@@ -51,6 +65,7 @@
unless (docinfo_content = node.docinfo :footer).empty?
result << docinfo_content
end
+ result << '</refentry>' if manpage
id, node.id = node.id, nil unless id
# defer adding root tag in case document ID is auto-generated on demand
result.insert root_tag_idx, %(<#{root_tag_name}
xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink"
version="5.0"#{lang_attribute}#{common_attributes id}>)
@@ -66,7 +81,7 @@
else
tag_name = node.sectname
end
- title_el = node.special && (node.option? 'untitled') ? '' :
%(<title>#{node.title}</title>\n)
+ title_el = node.special && ((node.option? 'notitle') || (node.option?
'untitled')) ? '' : %(<title>#{node.title}</title>\n)
%(<#{tag_name}#{common_attributes node.id, node.role, node.reftext}>
#{title_el}#{node.content}
</#{tag_name}>)
@@ -248,10 +263,10 @@
def convert_stem node
if (idx = node.subs.index :specialcharacters)
node.subs.delete_at idx
- equation = node.content || ''
+ equation = node.content
idx > 0 ? (node.subs.insert idx, :specialcharacters) :
(node.subs.unshift :specialcharacters)
else
- equation = node.content || ''
+ equation = node.content
end
if node.style == 'asciimath'
# NOTE fop requires jeuclid to process mathml markup
@@ -702,19 +717,6 @@
end
result << '</info>'
- if doc.doctype == 'manpage'
- result << '<refmeta>'
- result << %(<refentrytitle>#{doc.attr 'mantitle'}</refentrytitle>) if
doc.attr? 'mantitle'
- result << %(<manvolnum>#{doc.attr 'manvolnum'}</manvolnum>) if doc.attr?
'manvolnum'
- result << %(<refmiscinfo class="source">#{doc.attr 'mansource',
' '}</refmiscinfo>)
- result << %(<refmiscinfo class="manual">#{doc.attr 'manmanual',
' '}</refmiscinfo>)
- result << '</refmeta>'
- result << '<refnamediv>'
- result += (doc.attr 'mannames').map {|n| %(<refname>#{n}</refname>) } if
doc.attr? 'mannames'
- result << %(<refpurpose>#{doc.attr 'manpurpose'}</refpurpose>) if
doc.attr? 'manpurpose'
- result << '</refnamediv>'
- end
-
result.join LF
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/converter/html5.rb
new/lib/asciidoctor/converter/html5.rb
--- old/lib/asciidoctor/converter/html5.rb 2018-03-20 01:00:00.000000000
+0100
+++ new/lib/asciidoctor/converter/html5.rb 2018-03-20 01:00:00.000000000
+0100
@@ -675,7 +675,7 @@
title_element = node.title? ? %(<div
class="title">#{node.captioned_title}</div>\n) : ''
%(<div#{id_attribute} class="listingblock#{(role = node.role) ? " #{role}"
: ''}">
#{title_element}<div class="content">
-#{syntax_hl ? (syntax_hl.format node, lang, opts) : pre_open + (node.content
|| '') + pre_close}
+#{syntax_hl ? (syntax_hl.format node, lang, opts) : pre_open + node.content +
pre_close}
</div>
</div>)
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/converter/manpage.rb
new/lib/asciidoctor/converter/manpage.rb
--- old/lib/asciidoctor/converter/manpage.rb 2018-03-20 01:00:00.000000000
+0100
+++ new/lib/asciidoctor/converter/manpage.rb 2018-03-20 01:00:00.000000000
+0100
@@ -28,7 +28,7 @@
EllipsisCharRefRx = /…(?:​)?/
WrappedIndentRx = /#{CG_BLANK}*#{LF}#{CG_BLANK}*/
XMLMarkupRx = /&#?[a-z\d]+;|</
- PCDATAFilterRx = /(&#?[a-z\d]+;|<[^>]+>)|([^&<]+)/
+ PCDATAFilterRx =
%r((&#?[a-z\d]+;|<#{ESC}\\f\(CR.*?</#{ESC}\\fP>|<[^>]+>)|([^&<]+))
def initialize backend, opts = {}
@backend = backend
@@ -39,7 +39,7 @@
unless node.attr? 'mantitle'
raise 'asciidoctor: ERROR: doctype must be set to manpage when using
manpage backend'
end
- mantitle = node.attr 'mantitle'
+ mantitle = (node.attr 'mantitle').gsub InvalidSectionIdCharsRx, ''
manvolnum = node.attr 'manvolnum', '1'
manname = node.attr 'manname', mantitle
manmanual = node.attr 'manmanual'
@@ -236,7 +236,7 @@
result << (node.title? ? %(.sp
.B #{manify node.captioned_title}
.br) : '.sp')
- result << %([#{node.alt}])
+ result << %([#{manify node.alt}])
result.join LF
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/converter/template.rb
new/lib/asciidoctor/converter/template.rb
--- old/lib/asciidoctor/converter/template.rb 2018-03-20 01:00:00.000000000
+0100
+++ new/lib/asciidoctor/converter/template.rb 2018-03-20 01:00:00.000000000
+0100
@@ -29,7 +29,7 @@
erb: { trim: 0 },
# TODO line 466 of haml/compiler.rb sorts the attributes; file an issue to
make this configurable
# NOTE AsciiDoc syntax expects HTML/XML output to use double quotes around
attribute values
- haml: { format: :xhtml, attr_wrapper: '"', escape_attrs: false, ugly: true
},
+ haml: { format: :xhtml, attr_wrapper: '"', escape_html: false,
escape_attrs: false, ugly: true },
slim: { disable_escape: true, sort_attrs: false, pretty: false },
}
@@ -227,6 +227,7 @@
Helpers.require_library 'haml' unless defined? ::Haml::Engine
# NOTE Haml 5 dropped support for pretty printing
@engine_options[extsym].delete :ugly if defined?
::Haml::TempleEngine
+ @engine_options[extsym][:attr_quote] =
@engine_options[extsym].delete :attr_wrapper unless defined? ::Haml::Options
@active_engines[extsym] = true
end
when :erb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/extensions.rb
new/lib/asciidoctor/extensions.rb
--- old/lib/asciidoctor/extensions.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/extensions.rb 2018-03-20 01:00:00.000000000 +0100
@@ -1109,6 +1109,9 @@
# Public: Checks whether any {BlockProcessor} extensions are registered to
# handle the specified block name appearing on the specified context.
#
+ # This method assumes you've called blocks? first to check whether any
+ # block extensions are registered.
+ #
# Returns the [Extension] proxy object for the BlockProcessor that matches
# the block name and context or false if no match is found.
def registered_for_block? name, context
@@ -1124,6 +1127,9 @@
#
# name - the String or Symbol (coersed to a Symbol) macro name
#
+ # This method assumes you've called blocks? first to check whether any
+ # block extensions are registered.
+ #
# Returns the [Extension] object stored in the registry that proxies the
# corresponding BlockProcessor or nil if a match is not found.
def find_block_extension name
@@ -1200,6 +1206,9 @@
#
# name - the String or Symbol (coersed to a Symbol) macro name
#
+ # This method assumes you've called block_macros? first to check whether
any
+ # block macro extensions are registered.
+ #
# Returns the [Extension] proxy object for the BlockMacroProcessor that
matches
# the macro name or false if no match is found.
#--
@@ -1213,6 +1222,9 @@
#
# name - the String or Symbol (coersed to a Symbol) macro name
#
+ # This method assumes you've called block_macros? first to check whether
any
+ # block macro extensions are registered.
+ #
# Returns the [Extension] object stored in the registry that proxies the
# corresponding BlockMacroProcessor or nil if a match is not found.
def find_block_macro_extension name
@@ -1289,6 +1301,9 @@
#
# name - the String or Symbol (coersed to a Symbol) macro name
#
+ # This method assumes you've called inline_macros? first to check whether
any
+ # inline macro extensions are registered.
+ #
# Returns the [Extension] proxy object for the InlineMacroProcessor that
matches
# the macro name or false if no match is found.
def registered_for_inline_macro? name
@@ -1300,6 +1315,9 @@
#
# name - the String or Symbol (coersed to a Symbol) macro name
#
+ # This method assumes you've called inline_macros? first to check whether
any
+ # inline macro extensions are registered.
+ #
# Returns the [Extension] object stored in the registry that proxies the
# corresponding InlineMacroProcessor or nil if a match is not found.
def find_inline_macro_extension name
@@ -1309,6 +1327,9 @@
# Public: Retrieves the {Extension} proxy objects for all
# InlineMacroProcessor instances in this registry.
#
+ # This method assumes you've called inline_macros? first to check whether
any
+ # inline macro extensions are registered.
+ #
# Returns an [Array] of Extension proxy objects.
def inline_macros
@inline_macro_extensions.values
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/helpers.rb
new/lib/asciidoctor/helpers.rb
--- old/lib/asciidoctor/helpers.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/helpers.rb 2018-03-20 01:00:00.000000000 +0100
@@ -120,8 +120,14 @@
# str - the String to check
#
# returns true if the String is a URI, false if it is not
- def uriish? str
- (str.include? ':') && (UriSniffRx.match? str)
+ if ::RUBY_ENGINE == 'jruby'
+ def uriish? str
+ (str.include? ':') && !(str.start_with? 'uri:classloader:') &&
(UriSniffRx.match? str)
+ end
+ else
+ def uriish? str
+ (str.include? ':') && (UriSniffRx.match? str)
+ end
end
# Internal: Encode a URI component String for safe inclusion in a URI.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/parser.rb
new/lib/asciidoctor/parser.rb
--- old/lib/asciidoctor/parser.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/parser.rb 2018-03-20 01:00:00.000000000 +0100
@@ -398,18 +398,22 @@
# REVIEW this may be doing too much
if part
if !section.blocks?
- # if this block wasn't marked as [partintro], emulate behavior
as if it had
+ # if this not a [partintro] open block, enclose it in a
[partintro] open block
if new_block.style != 'partintro'
- # emulate [partintro] paragraph
- if new_block.context == :paragraph
- new_block.context = :open
+ # if this is already a normal open block, simply add the
partintro style
+ if new_block.style == 'open' && new_block.context == :open
new_block.style = 'partintro'
- # emulate [partintro] open block
else
new_block.parent = (intro = Block.new section, :open,
content_model: :compound)
intro.style = 'partintro'
section.blocks << intro
end
+ # if this is a [partintro] paragraph, convert it to a
[partintro] open block w/ single paragraph
+ elsif new_block.content_model == :simple
+ new_block.content_model = :compound
+ new_block << (Block.new new_block, :paragraph, source:
new_block.lines, subs: new_block.subs)
+ new_block.lines.clear
+ new_block.subs.clear
end
elsif section.blocks.size == 1
first_block = section.blocks[0]
@@ -419,12 +423,11 @@
# rebuild [partintro] paragraph as an open block
elsif first_block.content_model != :compound
new_block.parent = (intro = Block.new section, :open,
content_model: :compound)
- intro.style = 'partintro'
- section.blocks.shift
- if first_block.style == 'partintro'
+ if first_block.style == (intro.style = 'partintro')
first_block.context = :paragraph
first_block.style = nil
end
+ section.blocks.shift
intro << first_block
section.blocks << intro
end
@@ -1168,8 +1171,8 @@
if reftext.include? ']'
reftext = reftext.gsub '\]', ']'
reftext = document.sub_attributes reftext if reftext.include?
ATTR_REF_HEAD
- elsif (reftext.include? ATTR_REF_HEAD) && (reftext =
document.sub_attributes reftext).empty?
- next
+ elsif reftext.include? ATTR_REF_HEAD
+ reftext = nil if (reftext = document.sub_attributes reftext).empty?
end
end
end
@@ -1439,21 +1442,33 @@
# a delimited block immediately breaks the list unless preceded
# by a list continuation (they are harsh like that ;0)
- if (match = is_delimited_block?(this_line, true))
- if continuation == :active
- buffer << this_line
- # grab all the lines in the block, leaving the delimiters in place
- # we're being more strict here about the terminator, but I think
that's a good thing
- buffer.concat reader.read_lines_until(terminator: match.terminator,
read_last_line: true, context: nil)
- continuation = :inactive
- else
+ if (match = is_delimited_block? this_line, true)
+ break unless continuation == :active
+ buffer << this_line
+ # grab all the lines in the block, leaving the delimiters in place
+ # we're being more strict here about the terminator, but I think
that's a good thing
+ buffer.concat reader.read_lines_until terminator: match.terminator,
read_last_line: true, context: nil
+ continuation = :inactive
+ # BlockAttributeLineRx only breaks dlist if ensuing line is not a list
item
+ elsif dlist && continuation != :active && (this_line.start_with? '[') &&
(BlockAttributeLineRx.match? this_line)
+ block_attribute_lines = [this_line]
+ while (next_line = reader.peek_line)
+ if is_delimited_block? next_line
+ interrupt = true
+ elsif next_line.empty? || ((next_line.start_with? '[') &&
(BlockAttributeLineRx.match? next_line))
+ block_attribute_lines << reader.read_line
+ next
+ elsif (AnyListRx.match? next_line) && !(is_sibling_list_item?
next_line, list_type, sibling_trait)
+ buffer.concat block_attribute_lines
+ else # rubocop:disable Lint/DuplicateBranch
+ interrupt = true
+ end
+ break
+ end
+ if interrupt
+ reader.unshift_lines block_attribute_lines
break
end
- # technically BlockAttributeLineRx only breaks if ensuing line is not a
list item
- # which really means BlockAttributeLineRx only breaks if it's acting as
a block delimiter
- # FIXME to be AsciiDoc compliant, we shouldn't break if style in
attribute line is "literal" (i.e., [literal])
- elsif dlist && continuation != :active && (BlockAttributeLineRx.match?
this_line)
- break
elsif continuation == :active && !this_line.empty?
# literal paragraphs have special considerations (and this is one of
# two entry points into one)
@@ -1470,7 +1485,8 @@
end
continuation = :inactive
# let block metadata play out until we find the block
- elsif (BlockTitleRx.match? this_line) || (BlockAttributeLineRx.match?
this_line) || (AttributeEntryRx.match? this_line)
+ elsif ((ch0 = this_line.chr) == '.' && (BlockTitleRx.match?
this_line)) ||
+ (ch0 == '[' && (BlockAttributeLineRx.match? this_line)) || (ch0 ==
':' && (AttributeEntryRx.match? this_line))
buffer << this_line
else
if (nested_list_type = (within_nested_list ? [:dlist] :
NESTABLE_LIST_CONTEXTS).find {|ctx| ListRxMap[ctx].match? this_line })
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/path_resolver.rb
new/lib/asciidoctor/path_resolver.rb
--- old/lib/asciidoctor/path_resolver.rb 2018-03-20 01:00:00.000000000
+0100
+++ new/lib/asciidoctor/path_resolver.rb 2018-03-20 01:00:00.000000000
+0100
@@ -109,6 +109,7 @@
SLASH = '/'
BACKSLASH = '\\'
DOUBLE_SLASH = '//'
+ URI_CLASSLOADER = 'uri:classloader:'
WindowsRootRx = %r(^(?:[a-zA-Z]:)?[\\/])
attr_accessor :file_separator
@@ -148,8 +149,9 @@
# Public: Check if the specified path is an absolute root path (or, in the
# browser environment, an absolute URI as well)
#
- # This operation considers both posix paths and Windows paths. If the
JavaScript IO
- # module is xmlhttprequest, this operation also considers absolute URIs.
+ # This operation considers both POSIX and Windows paths. If the JavaScript
IO module
+ # is xmlhttprequest, this operation also considers absolute URIs. If running
on JRuby,
+ # this operation also considers classloader URIs (starts with
uri:classloader:).
#
# Unix absolute paths and UNC paths start with slash. Windows roots can
# start with a drive letter. When the IO module is xmlhttprequest (Opal
@@ -164,6 +166,10 @@
def root? path
(absolute_path? path) || (path.start_with? 'file://', 'http://',
'https://')
end
+ elsif ::RUBY_ENGINE == 'jruby'
+ def root? path
+ (absolute_path? path) || (path.start_with? URI_CLASSLOADER)
+ end
else
alias root? absolute_path?
end
@@ -299,6 +305,9 @@
# ex. /sample/path
elsif posix_path.start_with? SLASH
root = SLASH
+ # ex. uri:classloader:sample/path (or uri:classloader:/sample/path)
+ elsif posix_path.start_with? URI_CLASSLOADER
+ root = posix_path.slice 0, URI_CLASSLOADER.length
# ex. C:/sample/path (or file:///sample/path in browser environment)
else
root = posix_path.slice 0, (posix_path.index SLASH) + 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/reader.rb
new/lib/asciidoctor/reader.rb
--- old/lib/asciidoctor/reader.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/reader.rb 2018-03-20 01:00:00.000000000 +0100
@@ -125,16 +125,21 @@
# Returns the next line of the source data as a String if there are lines
remaining.
# Returns nothing if there is no more data.
def peek_line direct = false
- if direct || @look_ahead > 0
- @unescape_next_line ? ((line = @lines[-1]).slice 1, line.length) :
@lines[-1]
- elsif @lines.empty?
- @look_ahead = 0
- nil
- else
- # FIXME the problem with this approach is that we aren't
- # retaining the modified line (hence the @unescape_next_line tweak)
- # perhaps we need a stack of proxied lines
- (process_line @lines[-1]) || peek_line
+ while true
+ next_line = @lines[-1]
+ if direct || @look_ahead > 0
+ return @unescape_next_line ? (next_line.slice 1, next_line.length) :
next_line
+ elsif next_line
+ # FIXME the problem with this approach is that we aren't
+ # retaining the modified line (hence the @unescape_next_line tweak)
+ # perhaps we need a stack of proxied lines
+ if (line = process_line next_line)
+ return line
+ end
+ else
+ @look_ahead = 0
+ return
+ end
end
end
@@ -1197,15 +1202,16 @@
push_include inc_lines, inc_path, relpath, inc_offset, parsed_attrs
end
else
+ inc_content = nil
begin
# NOTE read content before shift so cursor is only advanced if IO
operation succeeds
inc_content = reader.call(inc_path, read_mode) {|f| f.read }
shift
- push_include inc_content, inc_path, relpath, 1, parsed_attrs
rescue
logger.error message_with_context %(include #{target_type} not
readable: #{inc_path}), source_location: cursor
return replace_next_line %(Unresolved directive in #{@path} -
include::#{expanded_target}[#{attrlist}])
end
+ push_include inc_content, inc_path, relpath, 1, parsed_attrs
end
true
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/rx.rb new/lib/asciidoctor/rx.rb
--- old/lib/asciidoctor/rx.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/rx.rb 2018-03-20 01:00:00.000000000 +0100
@@ -89,7 +89,7 @@
# include::chapter1.ad[]
# include::example.txt[lines=1;2;5..10]
#
- IncludeDirectiveRx = /^(\\)?include::([^\[][^\[]*)\[(#{CC_ANY}+)?\]$/
+ IncludeDirectiveRx =
/^(\\)?include::([^\s\[](?:[^\[]*[^\s\[])?)\[(#{CC_ANY}+)?\]$/
# Matches a trailing tag directive in an include file.
#
@@ -516,9 +516,9 @@
# <https://github.com>
# link:https://github.com[]
# "https://github.com[]"
+ # (https://github.com) <= parenthesis not included in autolink
#
- # FIXME revisit! the main issue is we need different rules for implicit vs
explicit
- InlineLinkRx =
%r((^|link:|#{CG_BLANK}|<|[>\(\)\[\];"'])(\\?(?:https?|file|ftp|irc)://[^\s\[\]<]*([^\s.,\[\]<]))(?:\[(|#{CC_ALL}*?[^\\])\])?)m
+ InlineLinkRx =
%r((^|link:|#{CG_BLANK}|<|[>\(\)\[\];"'])(\\?(?:https?|file|ftp|irc)://)(?:([^\s\[\]]+)\[(|#{CC_ALL}*?[^\\])\]|([^\s\[\]<]*([^\s,.?!\[\]<\)]))))m
# Match a link or e-mail inline macro.
#
@@ -568,23 +568,17 @@
# Examples
#
# +text+
- # `text` (compat)
+ # [x-]+text+
+ # [x-]`text`
+ # `text` (compat only)
+ # [role]`text` (compat only)
#
# NOTE we always capture the attributes so we know when to use compatible
(i.e., legacy) behavior
InlinePassRx = {
- false => ['+', '`',
/(^|[^#{CC_WORD};:])(?:\[([^\]]+)\])?(\\?(\+|`)(\S|\S#{CC_ALL}*?\S)\4)(?!#{CG_WORD})/m],
- true => ['`', nil,
/(^|[^`#{CC_WORD}])(?:\[([^\]]+)\])?(\\?(`)([^`\s]|[^`\s]#{CC_ALL}*?\S)\4)(?![`#{CC_WORD}])/m]
+ false => ['+', '-]',
/((?:^|[^#{CC_WORD};:\\])(?=(\[)|\+)|\\(?=\[)|(?=\\\+))(?:\2(x-|[^\]]+
x-)\]|(?:\[([^\]]+)\])?(?=(\\)?\+))(\5?(\+|`)(\S|\S#{CC_ALL}*?\S)\7)(?!#{CG_WORD})/m],
+ true => ['`', nil,
/(^|[^`#{CC_WORD}])(?:(\Z)()|\[([^\]]+)\](?=(\\))?)?(\5?(`)([^`\s]|[^`\s]#{CC_ALL}*?\S)\7)(?![`#{CC_WORD}])/m],
}
- # Matches an inline plus passthrough spanning multiple lines, but only when
it occurs directly
- # inside constrained monospaced formatting in non-compat mode.
- #
- # Examples
- #
- # +text+
- #
- SinglePlusInlinePassRx = /^(\\)?\+(\S|\S#{CC_ALL}*?\S)\+$/m
-
# Matches several variants of the passthrough inline macro, which may span
multiple lines.
#
# Examples
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/substitutors.rb
new/lib/asciidoctor/substitutors.rb
--- old/lib/asciidoctor/substitutors.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/substitutors.rb 2018-03-20 01:00:00.000000000 +0100
@@ -526,9 +526,9 @@
if found_colon && (text.include? '://')
# inline urls, target[text] (optionally prefixed with link: and
optionally surrounded by <>)
text = text.gsub InlineLinkRx do
- if (target = $2).start_with? RS
+ if (target = $2 + ($3 || $5)).start_with? RS
# honor the escape
- next %(#{$1}#{target.slice 1, target.length}#{$4})
+ next ($&.slice 0, (rs_idx = $1.length)) + ($&.slice rs_idx + 1,
$&.length)
end
prefix, suffix = $1, ''
@@ -543,15 +543,7 @@
when 'link:', ?", ?'
next $&
end
- case $3
- when ')', '?', '!'
- target = target.chop
- if (suffix = $3) == ')' && (target.end_with? '.', '?', '!')
- suffix = target[-1] + suffix
- target = target.chop
- end
- # NOTE handle case when modified target is a URI scheme (e.g.,
http://)
- next $& if target.end_with? '://'
+ case $6
when ';'
if (prefix.start_with? '<') && (target.end_with? '>')
# move surrounding <> out of URL
@@ -755,7 +747,7 @@
if doc.compat_mode
fragment = refid
- elsif (hash_idx = refid.index '#')
+ elsif (hash_idx = refid.index '#') && refid[hash_idx - 1] != '&'
if hash_idx > 0
if (fragment_len = refid.length - 1 - hash_idx) > 0
path, fragment = (refid.slice 0, hash_idx), (refid.slice
hash_idx + 1, fragment_len)
@@ -1027,11 +1019,17 @@
next %(#{$1}[#{attrlist}]#{RS * (escape_count -
1)}#{boundary}#{$5}#{boundary})
elsif $1 == RS
preceding = %([#{attrlist}])
- else
- if boundary == '++' && (attrlist.end_with? 'x-')
+ elsif boundary == '++'
+ if attrlist == 'x-'
+ old_behavior = true
+ attributes = {}
+ elsif attrlist.end_with? ' x-'
old_behavior = true
- attrlist = attrlist.slice 0, attrlist.length - 2
+ attributes = parse_quoted_text_attributes attrlist.slice 0,
attrlist.length - 3
+ else
+ attributes = parse_quoted_text_attributes attrlist
end
+ else
attributes = parse_quoted_text_attributes attrlist
end
elsif (escape_count = $3.length) > 0
@@ -1066,41 +1064,43 @@
pass_inline_char1, pass_inline_char2, pass_inline_rx =
InlinePassRx[compat_mode]
text = text.gsub pass_inline_rx do
preceding = $1
- attrlist = $2
- escape_mark = RS if (quoted_text = $3).start_with? RS
- format_mark = $4
- content = $5
+ attrlist = $4 || $3
+ escaped = true if $5
+ quoted_text = $6
+ format_mark = $7
+ content = $8
if compat_mode
old_behavior = true
- elsif (old_behavior = attrlist && (attrlist.end_with? 'x-'))
- attrlist = attrlist.slice 0, attrlist.length - 2
+ elsif attrlist && (attrlist == 'x-' || (attrlist.end_with? ' x-'))
+ old_behavior = old_behavior_forced = true
end
if attrlist
- if format_mark == '`' && !old_behavior
- next extract_inner_passthrough content,
%(#{preceding}[#{attrlist}]#{escape_mark})
- elsif escape_mark
+ if escaped
# honor the escape of the formatting mark
next %(#{preceding}[#{attrlist}]#{quoted_text.slice 1,
quoted_text.length})
elsif preceding == RS
# honor the escape of the attributes
+ next %(#{preceding}[#{attrlist}]#{quoted_text}) if
old_behavior_forced && format_mark == '`'
preceding = %([#{attrlist}])
+ elsif old_behavior_forced
+ attributes = attrlist == 'x-' ? {} : (parse_quoted_text_attributes
attrlist.slice 0, attrlist.length - 3)
else
attributes = parse_quoted_text_attributes attrlist
end
- elsif format_mark == '`' && !old_behavior
- next extract_inner_passthrough content, %(#{preceding}#{escape_mark})
- elsif escape_mark
+ elsif escaped
# honor the escape of the formatting mark
next %(#{preceding}#{quoted_text.slice 1, quoted_text.length})
+ elsif compat_mode && preceding == RS
+ next quoted_text
end
if compat_mode
passthrus[passthru_key = passthrus.size] = { text: content, subs:
BASIC_SUBS, attributes: attributes, type: :monospaced }
elsif attributes
if old_behavior
- subs = (format_mark == '`' ? BASIC_SUBS : NORMAL_SUBS)
+ subs = format_mark == '`' ? BASIC_SUBS : NORMAL_SUBS
passthrus[passthru_key = passthrus.size] = { text: content, subs:
subs, attributes: attributes, type: :monospaced }
else
passthrus[passthru_key = passthrus.size] = { text: content, subs:
BASIC_SUBS, attributes: attributes, type: :unquoted }
@@ -1399,20 +1399,6 @@
end.join LF)
end
- # Internal: Extract nested single-plus passthrough; otherwise return
unprocessed
- def extract_inner_passthrough text, pre
- if (text.end_with? '+') && (text.start_with? '+', '\+') &&
SinglePlusInlinePassRx =~ text
- if $1
- %(#{pre}`+#{$2}+`)
- else
- @passthroughs[passthru_key = @passthroughs.size] = { text: $2, subs:
BASIC_SUBS }
- %(#{pre}`#{PASS_START}#{passthru_key}#{PASS_END}`)
- end
- else
- %(#{pre}`#{text}`)
- end
- end
-
# Internal: Convert a quoted text region
#
# match - The MatchData for the quoted text region
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/asciidoctor/version.rb
new/lib/asciidoctor/version.rb
--- old/lib/asciidoctor/version.rb 2018-03-20 01:00:00.000000000 +0100
+++ new/lib/asciidoctor/version.rb 2018-03-20 01:00:00.000000000 +0100
@@ -1,4 +1,4 @@
# frozen_string_literal: true
module Asciidoctor
- VERSION = '2.0.18'
+ VERSION = '2.0.20'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/man/asciidoctor.1 new/man/asciidoctor.1
--- old/man/asciidoctor.1 2018-03-20 01:00:00.000000000 +0100
+++ new/man/asciidoctor.1 2018-03-20 01:00:00.000000000 +0100
@@ -1,13 +1,13 @@
'\" t
.\" Title: asciidoctor
.\" Author: Dan Allen, Sarah White
-.\" Generator: Asciidoctor 2.0.17
-.\" Date: 2022-01-05
+.\" Generator: Asciidoctor 2.0.19
+.\" Date: 2018-03-20
.\" Manual: Asciidoctor Manual
-.\" Source: Asciidoctor 2.0.17
+.\" Source: Asciidoctor 2.0.20
.\" Language: English
.\"
-.TH "ASCIIDOCTOR" "1" "2022-01-05" "Asciidoctor 2.0.17" "Asciidoctor Manual"
+.TH "ASCIIDOCTOR" "1" "2018-03-20" "Asciidoctor 2.0.20" "Asciidoctor Manual"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
@@ -67,10 +67,11 @@
.RS 4
Define, override, or unset a document attribute.
Command\-line attributes take precedence over attributes defined in the source
file unless either the name or value ends in \fI@\fP.
+No substitutions are applied to the value.
.sp
\fIATTRIBUTE\fP is normally formatted as a key\-value pair, in the form
\fINAME=VALUE\fP.
Alternate forms are \fINAME\fP (where the \fIVALUE\fP defaults to an empty
string), \fINAME!\fP (unsets the \fINAME\fP attribute), and \fINAME=VALUE@\fP
(or \fINAME@=VALUE\fP) (where \fIVALUE\fP does not override the \fINAME\fP
attribute if it\(cqs already defined in the source document).
-Values containing spaces should be enclosed in quotes.
+A value containing spaces must be enclosed in quotes, in the form
\fINAME="VALUE WITH SPACES"\fP.
.sp
This option may be specified more than once.
.RE
@@ -263,4 +264,4 @@
.SH "COPYING"
.sp
Copyright (C) 2012\-present Dan Allen, Sarah White, Ryan Waldron, and the
individual contributors to Asciidoctor.
-Use of this software is granted under the terms of the MIT License.
+Use of this software is granted under the terms of the MIT License.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/man/asciidoctor.adoc new/man/asciidoctor.adoc
--- old/man/asciidoctor.adoc 2018-03-20 01:00:00.000000000 +0100
+++ new/man/asciidoctor.adoc 2018-03-20 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
= asciidoctor(1)
Dan Allen; Sarah White
:doctype: manpage
-:release-version: 2.0.17
+:release-version: 2.0.20
:man manual: Asciidoctor Manual
:man source: Asciidoctor {release-version}
ifdef::backend-manpage[:!author:]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-03-20 01:00:00.000000000 +0100
+++ new/metadata 2018-03-20 01:00:00.000000000 +0100
@@ -1,7 +1,7 @@
--- !ruby/object:Gem::Specification
name: asciidoctor
version: !ruby/object:Gem::Version
- version: 2.0.18
+ version: 2.0.20
platform: ruby
authors:
- Dan Allen
@@ -63,14 +63,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 5.2.0
+ version: 6.1.0
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 5.2.0
+ version: 6.1.0
- !ruby/object:Gem::Dependency
name: minitest
requirement: !ruby/object:Gem::Requirement
@@ -91,14 +91,14 @@
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 1.10.0
+ version: 1.13.0
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
- version: 1.10.0
+ version: 1.13.0
- !ruby/object:Gem::Dependency
name: rake
requirement: !ruby/object:Gem::Requirement
@@ -188,6 +188,7 @@
- data/locale/attributes-sr.adoc
- data/locale/attributes-sr_Latn.adoc
- data/locale/attributes-sv.adoc
+- data/locale/attributes-sw.adoc
- data/locale/attributes-th.adoc
- data/locale/attributes-tr.adoc
- data/locale/attributes-uk.adoc
@@ -271,7 +272,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubygems_version: 3.3.7
+rubygems_version: 3.4.10
signing_key:
specification_version: 4
summary: An implementation of the AsciiDoc text processor and publishing
toolchain