Skip to content

asciidoctor-extensions: provide `<refmiscinfo/>`

Martin Ågren git 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 0 repliesNew
  2. v22 patches 10 repliesSuperseded
  3. v11 patch 29 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Doc/Makefile: give mansource/-version/-manual attributesDocumentation/Makefile Documentation/asciidoc.conf+5 -40 replies
2/3asciidoctor-extensions: provide `<refmiscinfo/>`Documentation/asciidoctor-extensions.rb+17 -00 replies
3/3doc-diff: replace --cut-header-footer with --cut-footerDocumentation/doc-diff+8 -90 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] asciidoctor-extensions: provide `<refmiscinfo/>`

Here's v3 of ma/asciidoctor-refmiscinfo to align the headers and footers of Asciidoctor-rendered manpages with those from AsciiDoc. Patch 1 is new.

It turns out that with newer (>=1.5.7) versions of Asciidoctor, we get default values of these refmiscinfo attributes put into the xml. The hack in patch 2/3 (previously patch 1/2) happened to inject these attributes after the default ones and it seems like the earlier ones happen to win when xmlto processes the xml. This explains what Peff noticed in [1], where the attribute values introduced by the hacky patch 2 are effectively ignored and blank values are used instead.

Rather than trying to game the order of those attributes, I decided to do a patch 1 which uses a saner way of providing these attributes to Asciidoctor. This allowed me to reframe patch 2 from "fix all of these attributes with Asciidoctor" to "fix some of them with some Asciidoctor versions".

My test results:

AsciiDoc (8.6.10): Each patch in this series is a no-op.

Asciidoctor 1.5.5 and 1.5.6: Patch 1/3 is a no-op. Patch 2/3 fixes the header/footer to be as with AsciiDoc, except for how the date is rendered.

Aciidoctor 1.5.7 and 2.0.10 [2]: Patch 1/3 fixes the header/footer partially -- the version number is still missing. Patch 2/3 fixes the version number, after which the header/footer are just as with AsciiDoc, except for how the date is rendered.

So in short, "all" versions of Asciidoctor now render the headers and footers like AsciiDoc does, except for the date formatting.

[1] https://public-inbox.org/git/[email protected]/

[2] The tests with 2.0.10 were done on top of brian's recent patch to build at all with Asciidoctor 2:
https://public-inbox.org/git/[email protected]/

Martin Ågren (3):
Doc/Makefile: give mansource/-version/-manual attributes
asciidoctor-extensions: provide <refmiscinfo/>
doc-diff: replace --cut-header-footer with --cut-footer

 Documentation/Makefile                  |  3 ++-
 Documentation/asciidoc.conf             |  6 +++---
 Documentation/asciidoctor-extensions.rb | 17 +++++++++++++++++
 Documentation/doc-diff                  | 17 ++++++++---------
 4 files changed, 30 insertions(+), 13 deletions(-)
Signature · 1 line
2.23.0