From f6e3a84824f5597ab4f1641edf957b8af4b51564 Mon Sep 17 00:00:00 2001 From: Arash Esbati Date: Sat, 23 Feb 2019 14:02:05 +0100 Subject: [PATCH] Improve matching of key-val labels * lisp/textmodes/reftex-vars.el (reftex-label-regexps): Improve regexp for key-val labels in order to skip over content in braces. --- lisp/textmodes/reftex-vars.el | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 9147de6e01..eb1dfc50a3 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -891,11 +891,29 @@ reftex-derive-label-parameters ;; so this list mustn't get any more items. (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}")) (defcustom reftex-label-regexps - '(;; Normal \\label{foo} labels + `(;; Normal \\label{foo} labels "\\\\label{\\(?1:[^}]*\\)}" ;; keyvals [..., label = {foo}, ...] forms used by ctable, ;; listings, minted, ... - "\\[[^][]\\{0,2000\\}\\