summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoost Kremers <joostkremers@fastmail.fm>2017-03-27 08:25:16 +0200
committerJoost Kremers <joostkremers@fastmail.fm>2017-03-27 08:40:54 +0200
commitf71e4c46ee8f2caa1c6f142a95ef495affdb2fc2 (patch)
tree9b395d2db07f9ef9e3cde2fad6b19e655e89c50f
parent489d5d800f7801f2182780159fdc494ada79ffe6 (diff)
Include pre-comment whitespace in comment contents.
Comments without braces need some whitespace after `@comment'. This is now included in the comment contents being returned.
-rw-r--r--parsebib.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/parsebib.el b/parsebib.el
index 9cd89c9..74901a3 100644
--- a/parsebib.el
+++ b/parsebib.el
@@ -401,10 +401,11 @@ beginning of the line POS is on. If POS is nil, it defaults to
point."
(when pos (goto-char pos))
(beginning-of-line)
- (when (parsebib--looking-at-goto-end (concat parsebib--entry-start "\\(comment[[:space:]]*\\)[\(\{]?") 1)
+ (when (parsebib--looking-at-goto-end (concat parsebib--entry-start "\\(comment\\)[[:space:]]*[\(\{]?") 1)
(let ((beg (point)))
- (if (looking-at-p "[\({]")
- (parsebib--match-paren-forward)
+ (if (looking-at-p "[[:space:]]*[\(\{]")
+ (progn (skip-chars-forward "[:space:]")
+ (parsebib--match-paren-forward))
(goto-char (point-at-eol)))
(buffer-substring-no-properties beg (point)))))