From 96e421160c5e682cedb8786b8a4bdbf59d7790d5 Mon Sep 17 00:00:00 2001 From: Artur Malabarba Date: Thu, 15 Jan 2015 14:28:45 -0200 Subject: Add comment support on sx--link-to-data --- sx.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sx.el b/sx.el index 950bbf0..ff481c1 100644 --- a/sx.el +++ b/sx.el @@ -93,6 +93,17 @@ with a `link' property)." (let ((result (list (cons 'site_par (sx--site link))))) ;; Try to strip a question or answer ID (when (or + ;; Comment + (and (string-match + ;; From inbox items + (rx "/posts/comments/" + ;; Comment ID + (group-n 1 (+ digit)) + ;; Stuff at the end + (or (sequence (any "?#") (* any)) "") + string-end) + link) + (push '(type . comment) result)) ;; Answer (and (or (string-match ;; From 'Share' button -- cgit v1.2.3