diff options
author | Gerald Combs <gerald@wireshark.org> | 2018-02-13 10:25:47 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2018-02-13 18:32:56 +0000 |
commit | 048c4373e15a401a8700bc57b403282c7830d27e (patch) | |
tree | b9a5f23ff7aa594f223825c8ad6429f83abc768e /docbook/asciidoctor-macros | |
parent | d332507ef2771f5c623a6768caadcabe6dd5583d (diff) | |
download | wireshark-048c4373e15a401a8700bc57b403282c7830d27e.tar.gz wireshark-048c4373e15a401a8700bc57b403282c7830d27e.tar.bz2 wireshark-048c4373e15a401a8700bc57b403282c7830d27e.zip |
Asciidoctor macro fixups.
Fix a few errors in the Asciidoctor macros. Use the new macro names in
the release notes and gen-bugnote.
Change-Id: I2ca672949c59ca3da8a6b963cb5bd9abd66c348d
Reviewed-on: https://code.wireshark.org/review/25774
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'docbook/asciidoctor-macros')
6 files changed, 14 insertions, 16 deletions
diff --git a/docbook/asciidoctor-macros/cve_idlink-inline-macro.rb b/docbook/asciidoctor-macros/cve_idlink-inline-macro.rb index e2dd67e586..fc1a5e2c9f 100644 --- a/docbook/asciidoctor-macros/cve_idlink-inline-macro.rb +++ b/docbook/asciidoctor-macros/cve_idlink-inline-macro.rb @@ -3,6 +3,6 @@ RUBY_ENGINE == 'opal' ? (require 'cve_idlink-inline-macro/extension') : (require_relative 'cve_idlink-inline-macro/extension') -Extensions.register :uri_schemes do +Extensions.register do inline_macro CVEIdLinkInlineMacro end diff --git a/docbook/asciidoctor-macros/cve_idlink-inline-macro/extension.rb b/docbook/asciidoctor-macros/cve_idlink-inline-macro/extension.rb index 1e505d48d0..fcf1f4ec33 100644 --- a/docbook/asciidoctor-macros/cve_idlink-inline-macro/extension.rb +++ b/docbook/asciidoctor-macros/cve_idlink-inline-macro/extension.rb @@ -14,11 +14,10 @@ class CVEIdLinkInlineMacro < Extensions::InlineMacroProcessor named :cve_idlink - def process parent, target, attrs - cvename = "CVE-#{target}" - cvenum = target + def process parent, cvenum, attrs + cvename = "CVE-#{cvenum}" suffix = '' - target = %(https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-{cvenum}) + target = %(https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-#{cvenum}) if parent.document.basebackend? 'html' parent.document.register :links, target %(#{(create_anchor parent, cvename, type: :link, target: target).render}) diff --git a/docbook/asciidoctor-macros/ws_buglink-inline-macro.rb b/docbook/asciidoctor-macros/ws_buglink-inline-macro.rb index 185fb390bc..38da3048fc 100644 --- a/docbook/asciidoctor-macros/ws_buglink-inline-macro.rb +++ b/docbook/asciidoctor-macros/ws_buglink-inline-macro.rb @@ -3,6 +3,6 @@ RUBY_ENGINE == 'opal' ? (require 'ws_buglink-inline-macro/extension') : (require_relative 'ws_buglink-inline-macro/extension') -Extensions.register :uri_schemes do +Extensions.register do inline_macro WSBugLinkInlineMacro end diff --git a/docbook/asciidoctor-macros/ws_buglink-inline-macro/extension.rb b/docbook/asciidoctor-macros/ws_buglink-inline-macro/extension.rb index f6509da9a6..3bc22b47be 100644 --- a/docbook/asciidoctor-macros/ws_buglink-inline-macro/extension.rb +++ b/docbook/asciidoctor-macros/ws_buglink-inline-macro/extension.rb @@ -13,17 +13,17 @@ include ::Asciidoctor class WSBugLinkInlineMacro < Extensions::InlineMacroProcessor use_dsl - named :'ws_buglink' + named :ws_buglink + parse_content_as :text name_positional_attributes 'bugtext' - def process parent, target, attrs - bugnum = target + def process parent, bugnum, attrs bugtext = if (attrs['bugtext']) attrs['bugtext'] else - 'Bug' + %(Bug #{bugnum}) end - target = %(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id={bugnum}) + target = %(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=#{bugnum}) if parent.document.basebackend? 'html' parent.document.register :links, target %(#{(create_anchor parent, bugtext, type: :link, target: target).render}) diff --git a/docbook/asciidoctor-macros/ws_salink-inline-macro.rb b/docbook/asciidoctor-macros/ws_salink-inline-macro.rb index 9e82f2854c..055ce64dfd 100644 --- a/docbook/asciidoctor-macros/ws_salink-inline-macro.rb +++ b/docbook/asciidoctor-macros/ws_salink-inline-macro.rb @@ -3,6 +3,6 @@ RUBY_ENGINE == 'opal' ? (require 'ws_salink-inline-macro/extension') : (require_relative 'ws_salink-inline-macro/extension') -Extensions.register :uri_schemes do +Extensions.register do inline_macro WSSALinkInlineMacro end diff --git a/docbook/asciidoctor-macros/ws_salink-inline-macro/extension.rb b/docbook/asciidoctor-macros/ws_salink-inline-macro/extension.rb index c76776bfe7..2c87e4350f 100644 --- a/docbook/asciidoctor-macros/ws_salink-inline-macro/extension.rb +++ b/docbook/asciidoctor-macros/ws_salink-inline-macro/extension.rb @@ -14,10 +14,9 @@ class WSSALinkInlineMacro < Extensions::InlineMacroProcessor named :'ws_salink' - def process parent, target, attrs - sanum = target - satext = "wnpa-sec-#{target}" - target = %(https://www.wireshark.org/security/wnpa-sec-{sanum}) + def process parent, sanum, attrs + satext = "wnpa-sec-#{sanum}" + target = %(https://www.wireshark.org/security/wnpa-sec-#{sanum}) if parent.document.basebackend? 'html' parent.document.register :links, target %(#{(create_anchor parent, satext, type: :link, target: target).render}) |