Class: CommonMarker::CompatRenderer
- Inherits:
-
Object
- Object
- CommonMarker::CompatRenderer
show all
- Defined in:
- lib/commonmarker/compat_renderer.rb
Overview
Compatibility with the RedCloth API.
Constant Summary
collapse
- DEFAULT_EXTENSIONS =
%i[tagfilter autolink table strikethrough].freeze
- DEFAULT_OPTIONS =
%i[GITHUB_PRE_LANG].freeze
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
#initialize(text, *exts, options: DEFAULT_OPTIONS) ⇒ CompatRenderer
Returns a new instance of CompatRenderer.
Instance Attribute Details
#extensions ⇒ <Symbol>
27
28
29
|
# File 'lib/commonmarker/compat_renderer.rb', line 27
def extensions
@extensions
end
|
#options ⇒ Symbol
24
25
26
|
# File 'lib/commonmarker/compat_renderer.rb', line 24
def options
@options
end
|
#text ⇒ String
21
22
23
|
# File 'lib/commonmarker/compat_renderer.rb', line 21
def text
@text
end
|
Instance Method Details
#to_html(*_dummy) ⇒ Object
29
30
31
|
# File 'lib/commonmarker/compat_renderer.rb', line 29
def to_html(*_dummy)
CommonMarker.render_html(text, options, extensions)
end
|