muflax65ngodyewp.onion/lib/markdown_link_check.rb

15 lines
285 B
Ruby
Raw Permalink Normal View History

class MarkdownLinkCheck < Nanoc::Filter
identifier :markdown_link_check
def run(content, params={})
content.each_line do |line|
2012-06-25 13:25:57 +02:00
if line =~ /\[^?.+?\]\[.*?\]/
puts "#{@item.identifier} -> #{line}"
raise "Unresolved link!"
end
end
end
end