aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Malabarba <bruce.connor.am@gmail.com>2014-11-26 16:15:55 +0000
committerArtur Malabarba <bruce.connor.am@gmail.com>2014-11-26 16:15:55 +0000
commit49b85115b488bd88d706d1630764f25c4e4312a2 (patch)
treebad985dd93eab4e12dc24b5a54f0fd67423777d1
parent8f4caddf383196c23e8131c4baa0b42d5e06e7dd (diff)
Finish partial fix.
-rw-r--r--sx-question-mode.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el
index 36d0090..19930e7 100644
--- a/sx-question-mode.el
+++ b/sx-question-mode.el
@@ -391,6 +391,13 @@ where `value' is given `face' as its face.
(forward-paragraph)))
(buffer-string)))
+(defvar sx-question-mode--reference-regexp
+ (rx line-start (0+ blank) "[%s]:" (0+ blank)
+ (group-n 1 (1+ (not blank))))
+ "Regexp used to find the url of labeled links.
+E.g.:
+ [1]: https://...")
+
(defun sx-question-mode--dont-fill-here ()
"If text shouldn't be filled here, return t and skip over it."
(or (sx-question-mode--move-over-pre)
@@ -398,7 +405,7 @@ where `value' is given `face' as its face.
(let ((pos (point)))
(skip-chars-forward "\r\n[:blank:]")
(goto-char (line-beginning-position))
- (if (or (looking-at-p sx-question-mode--reference-regexp)
+ (if (or (looking-at-p (format sx-question-mode--reference-regexp ".+"))
(looking-at-p "^#"))
;; Returns non-nil
(forward-paragraph)
@@ -460,13 +467,6 @@ URL is used as 'help-echo and 'url properties."
(or (get-text-property (or pos (point)) 'url)
(user-error "No url under point: %s" (or pos (point))))))
-(defvar sx-question-mode--reference-regexp
- (rx line-start (0+ blank) "[%s]:" (0+ blank)
- (group-n 1 (1+ (not blank))))
- "Regexp used to find the url of labeled links.
-E.g.:
- [1]: https://...")
-
(defun sx-question-mode-find-reference (id &optional fallback-id)
"Find url identified by reference ID in current buffer.
If ID is nil, use FALLBACK-ID instead."