mirror of
https://github.com/fmap/muflax65ngodyewp.onion
synced 2024-06-29 10:36:48 +02:00
15 lines
283 B
Ruby
15 lines
283 B
Ruby
class MarkdownLinkCheck < Nanoc::Filter
|
|
identifier :markdown_link_check
|
|
|
|
def run(content, params={})
|
|
content.each_line do |line|
|
|
if line =~ /\[.+?\]\[.*?\]/
|
|
puts "#{@item.identifier} -> #{line}"
|
|
raise "Unresolved link!"
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
|