mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
- Adds support for superscript when rendering article markdown - Chatwoot Markdown Render to render markdown everywhere Co-authored-by: Sojan <sojan@pepalo.com>
13 lines
375 B
Ruby
13 lines
375 B
Ruby
module MessageFormatHelper
|
|
include RegexHelper
|
|
|
|
def transform_user_mention_content(message_content)
|
|
# attachment message without content, message_content is nil
|
|
message_content.presence ? message_content.gsub(MENTION_REGEX, '\1') : ''
|
|
end
|
|
|
|
def render_message_content(message_content)
|
|
ChatwootMarkdownRenderer.new(message_content).render_message
|
|
end
|
|
end
|