diff options
author | Sean Allred <code@seanallred.com> | 2014-12-26 17:37:17 -0500 |
---|---|---|
committer | Sean Allred <code@seanallred.com> | 2014-12-26 17:37:17 -0500 |
commit | 0354bf2c974b13967558187936918db4af125571 (patch) | |
tree | ad44076e9977a0f0a714a9ce48456c60044b06a1 | |
parent | a935ee7e5aa887f345b50aa4e922732e31157628 (diff) |
Modify rx forms to be `rx-greedy-flag'-independent
See `rx' documentation for details.
-rw-r--r-- | sx.el | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -335,20 +335,20 @@ If ALIST doesn't have a `site' property, one is created using the ;; From 'Share' button (rx "/a/" ;; Question ID - (group (1+ digit)) + (group (+ digit)) ;; User ID - "/" (1+ digit) + "/" (+ digit) ;; Answer ID - (group (or (sequence "#" (0+ any)) "")) + (group (or (sequence "#" (* any)) "")) string-end) link) (string-match ;; From URL - (rx "/questions/" (1+ digit) "/" - (1+ (not (any "/"))) "/" + (rx "/questions/" (+ digit) "/" + (+ (not (any "/"))) "/" ;; User ID (optional (group (+ digit))) (optional "/") - (group (or (sequence "#" (0+ any)) "")) + (group (or (sequence "#" (* any)) "")) string-end) link)) (push '(type . answer) result)) ;; Question @@ -356,17 +356,17 @@ If ALIST doesn't have a `site' property, one is created using the ;; From 'Share' button (rx "/q/" ;; Question ID - (group (1+ digit)) + (group (+ digit)) ;; User ID - (optional "/" (1+ digit)) + (optional "/" (+ digit)) ;; Answer or Comment ID - (group (or (sequence "#" (0+ any)) "")) + (group (or (sequence "#" (* any)) "")) string-end) link) (string-match ;; From URL (rx "/questions/" ;; Question ID - (group (1+ digit)) + (group (+ digit)) "/") link)) (push '(type . question) result))) (push (cons 'id (string-to-number (match-string-no-properties 1 link))) |