Sha256: a595e6d4eee53b40e4186c3cf435d1f743a7dbd69c0951e4b0a9d370e2642958
Contents?: true
Size: 547 Bytes
Versions: 2
Compression:
Stored size: 547 Bytes
Contents
Detect links that include a hash ```ruby def scan_for_hash_links pwd = Dir.pwd folder = '' raise 'set folder' unless folder path = File.expand_path(File.join(folder, '**', '*.md')) Dir.glob(path) do |file| file = File.expand_path file relative_path = file.sub folder, '' next if File.directory?(file) data = File.read file data.scan(/(?<!!) \[ ( [^\[]* ) \] \( ( [^)]+ ) \)/x).each do |matched| puts "#{relative_path}: #{matched}" if matched.last.include?('.md#') end end end scan_for_hash_links ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
appium_doc_lint-0.0.11 | gist.md |
appium_doc_lint-0.0.10 | gist.md |