From f71e4c46ee8f2caa1c6f142a95ef495affdb2fc2 Mon Sep 17 00:00:00 2001 From: Joost Kremers Date: Mon, 27 Mar 2017 08:25:16 +0200 Subject: 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. --- parsebib.el | 7 ++++--- 1 file 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))))) -- cgit v1.2.3