Skip to content

Commit

Permalink
improve link checking
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpeck committed Apr 18, 2024
1 parent 4e07683 commit 016cb8a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions hog.el
Original file line number Diff line number Diff line change
Expand Up @@ -658,15 +658,15 @@ template at a specific PATH."
(line-beginning-position)
(line-end-position))))

(let* ((link (hog--get-link-at-point))
(link-is-glob (file-expand-wildcards link))
(link-exists (file-exists-p link)))
(when (and link
(not (string-empty-p link))
(not link-is-glob))
(when (not link-exists)
(setq errors (+ 1 errors))
(princ (format "Error:%d \"%s\" not found\n" (line-number-at-pos) link))))))
(let* ((link (hog--get-link-at-point)))
(when link
(let ((link-is-glob (file-expand-wildcards link))
(link-exists (file-exists-p link)))
(when (and (not (string-empty-p link))
(not link-is-glob)
(not link-exists))
(setq errors (+ 1 errors))
(princ (format "Error:%d \"%s\" not found\n" (line-number-at-pos) link)))))))
(forward-line))) errors))

(provide 'hog)
Expand Down

0 comments on commit 016cb8a

Please sign in to comment.