lib/wovnrb/html_replacers/link_replacer.rb in wovnrb-0.2.10 vs lib/wovnrb/html_replacers/link_replacer.rb in wovnrb-0.2.11
- old
+ new
@@ -8,9 +8,10 @@
def replace(dom, lang)
dom.xpath('//a').each do |node|
next if wovn_ignore?(node)
href = node.get_attribute('href')
+ next if href =~ /^\s*\{\{.+\}\}\s*$/
new_href = lang.add_lang_code(href, @pattern, @headers)
node.set_attribute('href', new_href)
end
end
end
\ No newline at end of file