Skip to content

Commit 6a40184

Browse files
committed
Move doc comment
1 parent feb4c60 commit 6a40184

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/html_pipeline/node_filter/absolute_source_filter.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44

55
class HTMLPipeline
66
class NodeFilter
7+
# HTML Filter for replacing relative and root relative image URLs with
8+
# fully qualified URLs
9+
#
10+
# This is useful if an image is root relative but should really be going
11+
# through a cdn, or if the content for the page assumes the host is known
12+
# i.e. scraped webpages and some RSS feeds.
13+
#
14+
# Context options:
15+
# :image_base_url - Base URL for image host for root relative src.
16+
# :image_subpage_url - For relative src.
17+
#
18+
# This filter does not write additional information to the context.
19+
# Note: This filter would need to be run before AssetProxyFilter.
720
class AbsoluteSourceFilter < NodeFilter
821
SELECTOR = Selma::Selector.new(match_element: "img")
922

1023
def selector
1124
SELECTOR
1225
end
1326

14-
# HTML Filter for replacing relative and root relative image URLs with
15-
# fully qualified URLs
16-
#
17-
# This is useful if an image is root relative but should really be going
18-
# through a cdn, or if the content for the page assumes the host is known
19-
# i.e. scraped webpages and some RSS feeds.
20-
#
21-
# Context options:
22-
# :image_base_url - Base URL for image host for root relative src.
23-
# :image_subpage_url - For relative src.
24-
#
25-
# This filter does not write additional information to the context.
26-
# This filter would need to be run before CamoFilter.
2727
def handle_element(element)
2828
src = element["src"]
2929
return if src.nil? || src.empty?

0 commit comments

Comments
 (0)