Class: UnrenderedLink
- Inherits:
-
HTMLProofer::Check
- Object
- HTMLProofer::Check
- UnrenderedLink
- Defined in:
- lib/html-proofer-unrendered-markdown.rb
Overview
HTMLProofer check for unrendered link
Instance Method Summary collapse
Instance Method Details
#run ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/html-proofer-unrendered-markdown.rb', line 8 def run return unless @runner.[:check_unrendered_link] node = @html.at_xpath("//*[text()[contains(.,'][')]]") return if node.nil? line_number = node.line content = node.to_s add_failure("Contains unrendered link ][! #{content}", line: line_number) end |