Sha256: da069102d4b60f358138a6f05df8b542a6574d2f04bf910e0f5fc254eeeded6f
Contents?: true
Size: 606 Bytes
Versions: 12
Compression:
Stored size: 606 Bytes
Contents
require 'rinku' module HTML class Pipeline # HTML Filter for auto_linking urls in HTML. # # Context options: # :autolink - boolean whether to autolink urls # :flags - additional Rinku flags. See https://github.com/vmg/rinku # # This filter does not write additional information to the context. class AutolinkFilter < Filter def call return html if context[:autolink] == false flags = 0 flags |= context[:flags] if context[:flags] Rinku.auto_link(html, :urls, nil, %w[a script kbd pre code], flags) end end end end
Version data entries
12 entries across 12 versions & 3 rubygems