2 # - https://github.com/senchalabs/jsduck/wiki/Tags
3 # - https://github.com/senchalabs/jsduck/wiki/Custom-tags
4 require 'jsduck/meta_tag'
6 class ContextTag
< JsDuck
::MetaTag
11 # @param tags All matches of this tag on one class.
13 return '<h3 class="pa">Context</h3>' + render_long_context(tags
.last
)
16 def render_long_context(tag
)
17 if tag
=~
/\A([^\s]+)/m
19 return format("`this` : {@link #{name}}")
24 class SeeTag
< JsDuck
::MetaTag
30 # @param tags All matches of this tag on one class.
33 doc
<< '<h3 class="pa">Related</h3>'
36 tags
.map
{|tag
| render_long_see(tag
) },
42 def render_long_see(tag
)
43 if tag
=~
/\A([^\s]+)( .*)?\Z/m
45 doc
= $2 ? ': ' + $2 : ''
48 format("{@link #{name}} #{doc}"),