Skip to content
Browse files
  • Loading branch information
ralsina committed Aug 18, 2015
1 parent 1a81901 commit 1e65556e9af46dd1b4b04a55b8816632ab75649e
Showing with 5 additions and 0 deletions.
  1. +5 −0 nikola/
@@ -1059,8 +1059,13 @@ def render_template(self, template_name, output_name, context):

def rewrite_links(self, doc, src, lang):
"""Replace links in document to point to the right places."""

# First let lxml replace most of them
doc.rewrite_links(lambda dst: self.url_replacer(src, dst, lang), resolve_base_href=False)

# lxml ignores srcset in img and source elements, so do that by hand
import pdb; pdb.set_trace()

def url_replacer(self, src, dst, lang=None, url_type=None):
"""Mangle URLs.

0 comments on commit 1e65556

Please sign in to comment.