Skip to content

Commit

Permalink
replace call to org-bracket-link-analytic-regexp
Browse files Browse the repository at this point in the history
... with org-link-bracket-re, per emacs warning.
  • Loading branch information
Brian O'Reilly authored and alphapapa committed Oct 29, 2023
1 parent eb41cdc commit 9f62323
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions org-web-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -288,17 +288,17 @@ current entry (i.e. this does not look deeper in the subtree, nor
outside of it) will be converted."
(interactive)
(cl-flet ((prev-url (entry-beg)
;; Work from the bottom of the list to the top, makes it simpler
(when (re-search-backward (rx "http" (optional "s") "://" (1+ (not (any space)))) entry-beg 'no-error)
;; Found link; see if it's an Org link
(beginning-of-line)
(if (re-search-forward org-bracket-link-analytic-regexp (line-end-position) 'noerror)
;; Org link
(list ;; Reconstruct link from regexp groups
(concat (match-string 1) (match-string 3))
(match-beginning 0))
;; Plain link
(list (match-string 0) (match-beginning 0))))))
;; Work from the bottom of the list to the top, makes it simpler
(when (re-search-backward (rx "http" (optional "s") "://" (1+ (not (any space)))) entry-beg 'no-error)
;; Found link; see if it's an Org link
(beginning-of-line)
(if (re-search-forward org-link-bracket-re (line-end-position) 'noerror)
;; Org link
(list ;; Reconstruct link from regexp groups
(concat (match-string 1) (match-string 3))
(match-beginning 0))
;; Plain link
(list (match-string 0) (match-beginning 0))))))
(let ((level (1+ (org-outline-level)))
(entry-beg (org-entry-beginning-position)))
(goto-char (org-entry-end-position))
Expand Down

0 comments on commit 9f62323

Please sign in to comment.