Class: ChatSDK::Format::Converter

Inherits:
Object
  • Object
show all
Defined in:
lib/chat_sdk/format/converter.rb

Instance Method Summary collapse

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