mirror of
https://github.com/danog/sass-site.git
synced 2024-12-04 10:28:22 +01:00
14 lines
308 B
Ruby
14 lines
308 B
Ruby
|
require 'html-proofer'
|
||
|
|
||
|
class RawMarkdownLink < HTMLProofer::Check
|
||
|
def run
|
||
|
@html.search('//text()').each do |node|
|
||
|
text = create_element(node)
|
||
|
|
||
|
if node.text =~ /(\[[^\]]+\](\[[^\]]*\]|\([^)]+\)))/
|
||
|
add_issue "Broken Markdown link #{$1}.", line: text.line
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|