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>
This commit is contained in:
Gerald Combs 2018-02-13 10:25:47 -08:00
parent d332507ef2
commit 048c4373e1
8 changed files with 22 additions and 24 deletions

View File

@ -3,6 +3,6 @@
RUBY_ENGINE == 'opal' ? (require 'cve_idlink-inline-macro/extension') : (require_relative 'cve_idlink-inline-macro/extension') 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 inline_macro CVEIdLinkInlineMacro
end end

View File

@ -14,11 +14,10 @@ class CVEIdLinkInlineMacro < Extensions::InlineMacroProcessor
named :cve_idlink named :cve_idlink
def process parent, target, attrs def process parent, cvenum, attrs
cvename = "CVE-#{target}" cvename = "CVE-#{cvenum}"
cvenum = target
suffix = '' 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' if parent.document.basebackend? 'html'
parent.document.register :links, target parent.document.register :links, target
%(#{(create_anchor parent, cvename, type: :link, target: target).render}) %(#{(create_anchor parent, cvename, type: :link, target: target).render})

View File

@ -3,6 +3,6 @@
RUBY_ENGINE == 'opal' ? (require 'ws_buglink-inline-macro/extension') : (require_relative 'ws_buglink-inline-macro/extension') 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 inline_macro WSBugLinkInlineMacro
end end

View File

@ -13,17 +13,17 @@ include ::Asciidoctor
class WSBugLinkInlineMacro < Extensions::InlineMacroProcessor class WSBugLinkInlineMacro < Extensions::InlineMacroProcessor
use_dsl use_dsl
named :'ws_buglink' named :ws_buglink
parse_content_as :text
name_positional_attributes 'bugtext' name_positional_attributes 'bugtext'
def process parent, target, attrs def process parent, bugnum, attrs
bugnum = target
bugtext = if (attrs['bugtext']) bugtext = if (attrs['bugtext'])
attrs['bugtext'] attrs['bugtext']
else else
'Bug' %(Bug #{bugnum})
end 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' if parent.document.basebackend? 'html'
parent.document.register :links, target parent.document.register :links, target
%(#{(create_anchor parent, bugtext, type: :link, target: target).render}) %(#{(create_anchor parent, bugtext, type: :link, target: target).render})

View File

@ -3,6 +3,6 @@
RUBY_ENGINE == 'opal' ? (require 'ws_salink-inline-macro/extension') : (require_relative 'ws_salink-inline-macro/extension') 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 inline_macro WSSALinkInlineMacro
end end

View File

@ -14,10 +14,9 @@ class WSSALinkInlineMacro < Extensions::InlineMacroProcessor
named :'ws_salink' named :'ws_salink'
def process parent, target, attrs def process parent, sanum, attrs
sanum = target satext = "wnpa-sec-#{sanum}"
satext = "wnpa-sec-#{target}" target = %(https://www.wireshark.org/security/wnpa-sec-#{sanum})
target = %(https://www.wireshark.org/security/wnpa-sec-{sanum})
if parent.document.basebackend? 'html' if parent.document.basebackend? 'html'
parent.document.register :links, target parent.document.register :links, target
%(#{(create_anchor parent, satext, type: :link, target: target).render}) %(#{(create_anchor parent, satext, type: :link, target: target).render})

View File

@ -152,24 +152,24 @@ locations on your system.
== Known Problems == Known Problems
Dumpcap might not quit if Wireshark or TShark crashes. Dumpcap might not quit if Wireshark or TShark crashes.
(ws-buglink:1419[]) (ws_buglink:1419[])
The BER dissector might infinitely loop. The BER dissector might infinitely loop.
(ws-buglink:1516[]) (ws_buglink:1516[])
Capture filters aren't applied when capturing from named pipes. Capture filters aren't applied when capturing from named pipes.
(ws-buglink:1814[]) (ws_buglink:1814[])
Filtering tshark captures with read filters (-R) no longer works. Filtering tshark captures with read filters (-R) no longer works.
(ws-buglink:2234[]) (ws_buglink:2234[])
Application crash when changing real-time option. Application crash when changing real-time option.
(ws-buglink:4035[]) (ws_buglink:4035[])
Wireshark and TShark will display incorrect delta times in some cases. Wireshark and TShark will display incorrect delta times in some cases.
(ws-buglink:4985[]) (ws_buglink:4985[])
Wireshark should let you work with multiple capture files. (ws-buglink:10488[]) Wireshark should let you work with multiple capture files. (ws_buglink:10488[])
== Getting Help == Getting Help

View File

@ -60,7 +60,7 @@ bug_title=$(
-e 's/\\/{backslash}/' \ -e 's/\\/{backslash}/' \
) )
echo -e "* $bug_title (ws-buglink:$bug_id[])\n" \ echo -e "* $bug_title (ws_buglink:$bug_id[])\n" \
| $recode_cmd \ | $recode_cmd \
| $clipboard_cmd | $clipboard_cmd