From 4c513fb4ab880b2c63491d91b8ccf6ce17627f08 Mon Sep 17 00:00:00 2001 From: Darius Davis Date: Sat, 20 Mar 2021 09:37:53 +1000 Subject: [PATCH] Minor doc cleanups. Here's a grab bag of trivial cleanup to the documentation. This change: - Cleans up some comments in the asciidoctor macros which are no longer accurate (and do not appear in the build products anyway). - Fixes a missing space in the text "Wireshark Q&A" in the release notes. - Allows the "docbook" backend to produce hyperlinks too... That seems to be necessary if we want to start using our custom link macros in WSDG, which seems like a reasonable thing to do. And fixes up a wrong variable name in the handling of the case where we are not able to produce a hyperlink. --- .../asciidoctor-macros/cveidlink-inline-macro/extension.rb | 3 ++- docbook/asciidoctor-macros/ws_utils.rb | 4 ++-- .../asciidoctor-macros/wsbuglink-inline-macro/extension.rb | 2 +- docbook/asciidoctor-macros/wssalink-inline-macro/extension.rb | 2 +- docbook/release-notes.adoc | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docbook/asciidoctor-macros/cveidlink-inline-macro/extension.rb b/docbook/asciidoctor-macros/cveidlink-inline-macro/extension.rb index 0c07233018..2dec88da3c 100644 --- a/docbook/asciidoctor-macros/cveidlink-inline-macro/extension.rb +++ b/docbook/asciidoctor-macros/cveidlink-inline-macro/extension.rb @@ -3,7 +3,8 @@ require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' include ::Asciidoctor -# An inline macro that generates links to related man pages. +# An inline macro that generates a link to a CVE Record identified by its CVE +# Number. # # Usage # diff --git a/docbook/asciidoctor-macros/ws_utils.rb b/docbook/asciidoctor-macros/ws_utils.rb index cff181cb15..9a4551a0fa 100644 --- a/docbook/asciidoctor-macros/ws_utils.rb +++ b/docbook/asciidoctor-macros/ws_utils.rb @@ -1,13 +1,13 @@ # SPDX-License-Identifier: MIT module WsUtils def create_doc_links(parent, target, text) - if parent.document.basebackend? 'html' + if (parent.document.basebackend? 'docbook') || (parent.document.basebackend? 'html') parent.document.register :links, target create_anchor(parent, text, type: :link, target: target).render.to_s elsif parent.document.backend == 'manpage' "\\fB#{text}" else - bugtext + text end end end diff --git a/docbook/asciidoctor-macros/wsbuglink-inline-macro/extension.rb b/docbook/asciidoctor-macros/wsbuglink-inline-macro/extension.rb index 21e8119125..6cdb665b52 100644 --- a/docbook/asciidoctor-macros/wsbuglink-inline-macro/extension.rb +++ b/docbook/asciidoctor-macros/wsbuglink-inline-macro/extension.rb @@ -3,7 +3,7 @@ require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' include ::Asciidoctor -# An inline macro that generates links to related man pages. +# An inline macro that generates a link to a Wireshark bug report. # # Usage # diff --git a/docbook/asciidoctor-macros/wssalink-inline-macro/extension.rb b/docbook/asciidoctor-macros/wssalink-inline-macro/extension.rb index 62e7612fab..3af9c8f32b 100644 --- a/docbook/asciidoctor-macros/wssalink-inline-macro/extension.rb +++ b/docbook/asciidoctor-macros/wssalink-inline-macro/extension.rb @@ -3,7 +3,7 @@ require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal' include ::Asciidoctor -# An inline macro that generates links to related man pages. +# An inline macro that generates a link to a Wireshark Security Advisory. # # Usage # diff --git a/docbook/release-notes.adoc b/docbook/release-notes.adoc index 9220662b92..0fe98cacc0 100644 --- a/docbook/release-notes.adoc +++ b/docbook/release-notes.adoc @@ -115,7 +115,7 @@ The User’s Guide, manual pages and various other documentation can be found at https://www.wireshark.org/docs/ Community support is available on -https://ask.wireshark.org/[Wireshark’sQ&A site] +https://ask.wireshark.org/[Wireshark’s Q&A site] and on the wireshark-users mailing list. Subscription information and archives for all of Wireshark’s mailing lists can be found on https://www.wireshark.org/lists/[the web site].