Class: Coradoc::Markdown::Serializer::Strategies::Admonition::Github
- Defined in:
- lib/coradoc/markdown/serializer/strategies/admonition/github.rb
Overview
GitHub-style: a styled blockquote with ‘TYPE:` prefix. Renders correctly in GitHub, GitLab, and most renderers that recognize the bold-prefix pattern.
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.render(admonition, ctx) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/coradoc/markdown/serializer/strategies/admonition/github.rb', line 15 def render(admonition, ctx) type = admonition.admonition_type.to_s.upcase body = render_body(admonition, ctx) body = "**#{admonition.title}**\n\n#{body}" if admonition.title && !admonition.title.to_s.strip.empty? "> **#{type}:** #{body}" end |