1 # SPDX-License-Identifier: MIT
2 require 'asciidoctor/extensions' unless RUBY_ENGINE == 'opal'
6 # An inline macro that generates a link to a Wireshark bug report.
10 # wsbuglink:<number>[<issue text>]
11 # Default bug text is "Issue <number>".
13 class WSBugLinkInlineMacro < Extensions::InlineMacroProcessor
18 parse_content_as :text
20 def process(parent, issueid, attrs)
21 bugtext = attrs['text'] || %(Issue #{issueid})
22 target = %(https://gitlab.com/wireshark/wireshark/-/issues/#{issueid})
23 create_doc_links(parent, target, bugtext)