aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Allred <code@seanallred.com>2014-12-26 17:21:26 -0500
committerSean Allred <code@seanallred.com>2014-12-26 17:21:26 -0500
commit60e483c5f6bfa5ea897f3bc6f85f402b09f63d9e (patch)
treec81a60012ac60e7191a466e0c1b534e14bd9bb02
parent0e54ca6ad3e4cf11b5512fadef39066e955e6281 (diff)
Groups on their own lines
Ideally, these groups would have explanations of what they capture. For now, the official stance is 'eh'.
-rw-r--r--sx.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/sx.el b/sx.el
index 091526f..7f6b901 100644
--- a/sx.el
+++ b/sx.el
@@ -323,7 +323,10 @@ If ALIST doesn't have a `site' property, one is created using the
(when (or
;; Answer
(and (or (string-match
- (rx "/a/" (group (1+ digit)) "/"
+ (rx "/a/"
+ ;; Answer ID
+ (group (1+ digit))
+ "/"
(1+ digit)
(group (or (sequence "#" (0+ any)) ""))
string-end) link)
@@ -344,7 +347,8 @@ If ALIST doesn't have a `site' property, one is created using the
string-end) link)
(string-match
(rx "/questions/"
- (group (1+ digit)) "/") link))
+ (group (1+ digit))
+ "/") link))
(push '(type . question) result)))
(push (cons 'id (string-to-number (match-string-no-properties 1 link)))
result))