Module: Jazzy::Markdown
- Defined in:
- lib/jazzy/jazzy_markdown.rb
Defined Under Namespace
Modules: Footnotes
Classes: JazzyCopyright, JazzyDeclarationHTML, JazzyHTML
Constant Summary
collapse
- REDCARPET_OPTIONS =
rubocop:enable Metrics/ClassLength
{
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.
10
11
12
|
# File 'lib/jazzy/jazzy_markdown.rb', line 10
def has_math
@has_math
end
|
Class Method Details
.copyright_markdown ⇒ Object
282
283
284
285
286
287
|
# File 'lib/jazzy/jazzy_markdown.rb', line 282
def self.copyright_markdown
@copyright_markdown ||= Redcarpet::Markdown.new(
JazzyCopyright,
REDCARPET_OPTIONS,
)
end
|
.markdown ⇒ Object
257
258
259
|
# File 'lib/jazzy/jazzy_markdown.rb', line 257
def self.markdown
@markdown ||= Redcarpet::Markdown.new(renderer, REDCARPET_OPTIONS)
end
|
.render(markdown_text, default_language = nil) ⇒ Object
261
262
263
264
265
|
# File 'lib/jazzy/jazzy_markdown.rb', line 261
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
289
290
291
|
# File 'lib/jazzy/jazzy_markdown.rb', line 289
def self.render_copyright(markdown_text)
copyright_markdown.render(markdown_text)
end
|
.rendered_parameters ⇒ Object
271
272
273
|
# File 'lib/jazzy/jazzy_markdown.rb', line 271
def self.rendered_parameters
renderer.parameters
end
|
.rendered_returns ⇒ Object
267
268
269
|
# File 'lib/jazzy/jazzy_markdown.rb', line 267
def self.rendered_returns
renderer.returns
end
|
.renderer ⇒ Object
253
254
255
|
# File 'lib/jazzy/jazzy_markdown.rb', line 253
def self.renderer
@renderer ||= JazzyDeclarationHTML.new
end
|