Module: Jazzy::Markdown
- Defined in:
- lib/jazzy/jazzy_markdown.rb
Defined Under Namespace
Classes: JazzyCopyright, JazzyDeclarationHTML, JazzyHTML
Constant Summary
collapse
- REDCARPET_OPTIONS =
{
autolink: true,
fenced_code_blocks: true,
no_intra_emphasis: true,
quote: true,
strikethrough: true,
space_after_headers: false,
tables: true,
lax_spacing: true,
}.freeze
Class Method Summary
collapse
Class Method Details
.copyright_markdown ⇒ Object
184
185
186
187
188
189
|
# File 'lib/jazzy/jazzy_markdown.rb', line 184
def self.copyright_markdown
@copyright_markdown ||= Redcarpet::Markdown.new(
JazzyCopyright,
REDCARPET_OPTIONS,
)
end
|
.markdown ⇒ Object
160
161
162
|
# File 'lib/jazzy/jazzy_markdown.rb', line 160
def self.markdown
@markdown ||= Redcarpet::Markdown.new(renderer, REDCARPET_OPTIONS)
end
|
.render(markdown_text) ⇒ Object
164
165
166
167
|
# File 'lib/jazzy/jazzy_markdown.rb', line 164
def self.render(markdown_text)
renderer.reset
markdown.render(markdown_text)
end
|
.render_copyright(markdown_text) ⇒ Object
191
192
193
|
# File 'lib/jazzy/jazzy_markdown.rb', line 191
def self.render_copyright(markdown_text)
copyright_markdown.render(markdown_text)
end
|
.rendered_parameters ⇒ Object
173
174
175
|
# File 'lib/jazzy/jazzy_markdown.rb', line 173
def self.rendered_parameters
renderer.parameters
end
|
.rendered_returns ⇒ Object
169
170
171
|
# File 'lib/jazzy/jazzy_markdown.rb', line 169
def self.rendered_returns
renderer.returns
end
|
.renderer ⇒ Object
156
157
158
|
# File 'lib/jazzy/jazzy_markdown.rb', line 156
def self.renderer
@renderer ||= JazzyDeclarationHTML.new
end
|