aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2015-01-24 01:01:37 -0200
committerArtur Malabarba <bruce.connor.am@gmail.com>2015-01-24 01:01:37 -0200
commita2d526c4b12ffa1cece78be7e6bfedf0b2b60576 (patch)
treebe59848ae550b5332c8f37098590057635d1c6af
parent34a3a31dd2fe6db30a31696148a236d58df4eee3 (diff)
Less demanding final regexp for questions.
-rw-r--r--sx.el7
1 files changed, 1 insertions, 6 deletions
diff --git a/sx.el b/sx.el
index e0609a7..26151b3 100644
--- a/sx.el
+++ b/sx.el
@@ -148,12 +148,7 @@ with a `link' property)."
;; From URL
(string-match (rx "/questions/"
;; Question ID
- (group-n 1 (+ digit)) "/"
- ;; Optional question title
- (optional (+ (not (any "/"))) "/")
- ;; Garbage at the end
- (optional (and (any "?#") (* any)))
- string-end)
+ (group-n 1 (+ digit)) "/")
link))
(push '(type . question) result)))
(push (cons 'id (string-to-number (match-string-no-properties 1 link)))