Module: Jazzy::Markdown
- Defined in:
- lib/jazzy/jazzy_markdown.rb
Defined Under Namespace
Modules: Footnotes
Classes: JazzyCopyright, JazzyDeclarationHTML, JazzyHTML
Constant Summary
collapse
- REDCARPET_OPTIONS =
{
autolink: true,
fenced_code_blocks: true,
no_intra_emphasis: true,
strikethrough: true,
space_after_headers: false,
tables: true,
lax_spacing: true,
footnotes: true,
}.freeze
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.has_math ⇒ Object
Returns the value of attribute has_math.
8
9
10
|
# File 'lib/jazzy/jazzy_markdown.rb', line 8
def has_math
@has_math
end
|
Class Method Details
.copyright_markdown ⇒ Object
249
250
251
252
253
254
|
# File 'lib/jazzy/jazzy_markdown.rb', line 249
def self.copyright_markdown
@copyright_markdown ||= Redcarpet::Markdown.new(
JazzyCopyright,
REDCARPET_OPTIONS,
)
end
|
.markdown ⇒ Object
224
225
226
|
# File 'lib/jazzy/jazzy_markdown.rb', line 224
def self.markdown
@markdown ||= Redcarpet::Markdown.new(renderer, REDCARPET_OPTIONS)
end
|
.render(markdown_text, default_language = nil) ⇒ Object
228
229
230
231
232
|
# File 'lib/jazzy/jazzy_markdown.rb', line 228
def self.render(markdown_text, default_language = nil)
renderer.reset
renderer.default_language = default_language
markdown.render(markdown_text)
end
|
.render_copyright(markdown_text) ⇒ Object
256
257
258
|
# File 'lib/jazzy/jazzy_markdown.rb', line 256
def self.render_copyright(markdown_text)
copyright_markdown.render(markdown_text)
end
|
.rendered_parameters ⇒ Object
238
239
240
|
# File 'lib/jazzy/jazzy_markdown.rb', line 238
def self.rendered_parameters
renderer.parameters
end
|
.rendered_returns ⇒ Object
234
235
236
|
# File 'lib/jazzy/jazzy_markdown.rb', line 234
def self.rendered_returns
renderer.returns
end
|
.renderer ⇒ Object
220
221
222
|
# File 'lib/jazzy/jazzy_markdown.rb', line 220
def self.renderer
@renderer ||= JazzyDeclarationHTML.new
end
|