diff --git a/app/javascript/styles/mastodon/rich_text.scss b/app/javascript/styles/mastodon/rich_text.scss index 0d70eced55..f5d4cde6c6 100644 --- a/app/javascript/styles/mastodon/rich_text.scss +++ b/app/javascript/styles/mastodon/rich_text.scss @@ -81,6 +81,10 @@ ol { list-style-type: decimal; } + + sup { + vertical-align: super; + } } .reply-indicator__content { diff --git a/app/lib/text_formatter.rb b/app/lib/text_formatter.rb index 607583ab2f..91c0ac1273 100644 --- a/app/lib/text_formatter.rb +++ b/app/lib/text_formatter.rb @@ -171,9 +171,11 @@ class TextFormatter @markdown ||= Redcarpet::Markdown.new(@htmlobj, autolink: false, tables: false, - underline: true, disable_indented_code_blocks: false, fenced_code_blocks: true, + strikethrough: true, + superscript: true, + underline: true, highlight: false ) @markdown.render(html) @@ -196,6 +198,10 @@ class TextFormatter "

#{text}

" end + def underline(text) + text.include?(':') ? nil : '' + text + '' + end + private def process_program_code(code)