class Jazzy::Markdown::JazzyDeclarationHTML
Spot and capture returns & param HTML for separate display.
Constants
- IDENT_PAT
- INTRO_PAT
- OUTRO_PAT
- PARAM_PAT
- PARAM_PAT1
Param formats: normal swift, objc via sourcekitten, and possibly inside ‘Parameters:’
- PARAM_PAT2
- PARAM_PAT3
- PARAM_REGEX
- RETURNS_REGEX
Attributes
parameters[R]
returns[R]
Public Instance Methods
list_item(text, _list_type)
click to toggle source
Calls superclass method
Jazzy::Markdown::JazzyHTML#list_item
# File lib/jazzy/jazzy_markdown.rb, line 238 def list_item(text, _list_type) if text =~ RETURNS_REGEX @returns = render_param_returns(Regexp.last_match) elsif text =~ PARAM_REGEX @parameters[Regexp.last_match(:param)] = render_param_returns(Regexp.last_match) end super end
render_param_returns(matches)
click to toggle source
# File lib/jazzy/jazzy_markdown.rb, line 248 def render_param_returns(matches) body = matches[:intro].strip + matches[:outro].strip body = "<p>#{body}</p>" unless body.start_with?('<p>') # call smartypants for pretty quotes etc. postprocess(body) end
reset()
click to toggle source
Calls superclass method
Jazzy::Markdown::Footnotes#reset
# File lib/jazzy/jazzy_markdown.rb, line 215 def reset @returns = nil @parameters = {} super end