diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:53 +0000 |
commit | a86c5f7cae7ec9a3398300555a0b644689d946a1 (patch) | |
tree | 39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /docbook/asciidoctor-macros/manarg-block | |
parent | Releasing progress-linux version 4.2.6-1~progress7.99u1. (diff) | |
download | wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip |
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docbook/asciidoctor-macros/manarg-block')
-rw-r--r-- | docbook/asciidoctor-macros/manarg-block/extension.rb | 45 | ||||
-rw-r--r-- | docbook/asciidoctor-macros/manarg-block/sample.adoc | 19 |
2 files changed, 0 insertions, 64 deletions
diff --git a/docbook/asciidoctor-macros/manarg-block/extension.rb b/docbook/asciidoctor-macros/manarg-block/extension.rb deleted file mode 100644 index 2461e723..00000000 --- a/docbook/asciidoctor-macros/manarg-block/extension.rb +++ /dev/null @@ -1,45 +0,0 @@ -# SPDX-License-Identifier: MIT -require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' - -include Asciidoctor - -# An inline macro that generates markup for man page arguments. -# Adapted from https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/lib/man-inline-macro.rb -# -# Usage: -# -# [manarg] -# *command* -# [ *--help* ] -# [ *--flash-lights* ] -# -class ManArgBlock < Extensions::BlockProcessor - use_dsl - - named :manarg - parse_content_as :simple - - def process parent, reader, attrs - nowrap_lines = reader.readlines.map {|line| - if parent.document.basebackend? 'html' - # Apply the custom style "[.nowrap]## ... ##" to each line. - # This generates "<span content="nowrap"> ... </span>". Pass - # each '#' through for extra paranoia. - %([.nowrap]###{line.gsub('#', '+++#+++')}##) - elsif parent.document.backend == 'manpage' - # Replace spaces with non-breaking spaces (' '), then make - # bold markup unconstrained ('*' -> '**'). For now we naively - # assume that bolds are always constrained (that is, we only - # have single '*'s). We *should* be able to do this properly - # with a regex, but for some reason - # gsub(/([^*])\*([^*])/, '\1**\2') - # doesn't match the first asterisk in "*--extcap-interface*=<interface>" - %(#{line.gsub(' ', ' ').gsub('*', '**')}) - else - line - end - } - # STDERR.puts(nowrap_lines) - create_paragraph parent, nowrap_lines, attrs - end -end diff --git a/docbook/asciidoctor-macros/manarg-block/sample.adoc b/docbook/asciidoctor-macros/manarg-block/sample.adoc deleted file mode 100644 index 5b4a4019..00000000 --- a/docbook/asciidoctor-macros/manarg-block/sample.adoc +++ /dev/null @@ -1,19 +0,0 @@ -= androiddump(1) -:doctype: manpage - -== NAME - -sample - Sample man page - -== SYNOPSIS - -[manarg] -*androiddump* -*--mandatory-argument -[ *--optional-argument* ] -*--complex-mandatory*=<argument> -[ *--complex-optional*=<argument> ] - -== DESCRIPTION - -Sample man page. |