Sha256: f3ca84c1c8c28d957455d1b73937b97aa8112470261dc06fe1c829a5b7fd355e
Contents?: true
Size: 572 Bytes
Versions: 8
Compression:
Stored size: 572 Bytes
Contents
# frozen_string_literal: true require 'thredded/email_transformer/base' module Thredded module MarkdownKatex # Replaces Katex blocks with their `<math>` content and makes them visible, # because most email clients do not support webfonts, and webfonts are # required for the non-`<math>` version. class EmailTransformer < Thredded::EmailTransformer::Base def call doc.css('.katex').each do |katex| math = katex.at('math') math.remove_attribute('class') katex.swap math end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems