Class: ChatSDK::Format::Converter
- Inherits:
-
Object
- Object
- ChatSDK::Format::Converter
- Defined in:
- lib/chat_sdk/format/converter.rb
Instance Method Summary collapse
- #from_markdown(markdown) ⇒ Object
- #parse(markdown) ⇒ Object
- #render_html(node) ⇒ Object
- #render_markdown(node) ⇒ Object
- #to_markdown(platform_text) ⇒ Object
Instance Method Details
#from_markdown(markdown) ⇒ Object
12 13 14 |
# File 'lib/chat_sdk/format/converter.rb', line 12 def from_markdown(markdown) markdown end |
#parse(markdown) ⇒ Object
16 17 18 |
# File 'lib/chat_sdk/format/converter.rb', line 16 def parse(markdown) Commonmarker.parse(markdown) end |
#render_html(node) ⇒ Object
24 25 26 |
# File 'lib/chat_sdk/format/converter.rb', line 24 def render_html(node) node.to_html end |
#render_markdown(node) ⇒ Object
20 21 22 |
# File 'lib/chat_sdk/format/converter.rb', line 20 def render_markdown(node) node.to_commonmark end |
#to_markdown(platform_text) ⇒ Object
8 9 10 |
# File 'lib/chat_sdk/format/converter.rb', line 8 def to_markdown(platform_text) platform_text end |