module ActionTextSyntaxHighlighter::PreTagsToHighlightedCodeBlocksConversion
Public Instance Methods
Private Instance Methods
attachment_node_for(code_block)
click to toggle source
# File lib/action_text_syntax_highlighter/pre_tags_to_highlighted_code_blocks_conversion.rb, line 17 def attachment_node_for(code_block) attachment_node = Nokogiri::XML::Node.new(attachment_tag_name, @document) attachment_node[:"content-type"] = "text/html" attachment_node[:sgid] = code_block.attachable_sgid attachment_node end
attachment_tag_name()
click to toggle source
# File lib/action_text_syntax_highlighter/pre_tags_to_highlighted_code_blocks_conversion.rb, line 24 def attachment_tag_name ActionText::Attachment.try(:tag_name) || ActionText::Attachment::TAG_NAME end
sanitizer()
click to toggle source
# File lib/action_text_syntax_highlighter/pre_tags_to_highlighted_code_blocks_conversion.rb, line 28 def sanitizer @sanitizer ||= Rails::Html::FullSanitizer.new end