mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 20:41:11 +08:00
DEV: Add additional_allowed_tags
to HtmlToMarkdown
Import script often use subclasses of `HtmlToMarkdown` and might need to allow additional tags that can be used within the custom class.
This commit is contained in:

committed by
Gerhard Schlager

parent
1a42249bd8
commit
b8f2cbf41c
@ -26,7 +26,7 @@ class HtmlToMarkdown
|
||||
end
|
||||
|
||||
def remove_not_allowed!(doc)
|
||||
allowed = Set.new
|
||||
allowed = Set.new(@opts[:additional_allowed_tags] || [])
|
||||
|
||||
HtmlToMarkdown.private_instance_methods.each do |m|
|
||||
if tag = m.to_s[/^visit_(.+)/, 1]
|
||||
|
Reference in New Issue
Block a user