From 580997252f80b765b208fcd9f4c696c061e2b9ad Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 15 Nov 2012 14:49:53 -0500 Subject: emacs: Improve the regexp used to match id:'s in messages This regexp agrees with Xapian query syntax much more closely, though we specifically disallow various cases that would be confusing in the context of an email body (e.g., punctuation at the end of an id: link is not considered part of the id: link because it's probably part of the surrounding text). In particular, this handles id: links that are not surrounded by quotes much better, which stash is much more likely to generate now that we don't quote id's that don't need to be quoted. It also handles quoted id: links better. We update the buttonization test to reflect the new pattern. --- test/emacs-show | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/emacs-show b/test/emacs-show index 5d7151b5..e2d7c706 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -136,23 +136,23 @@ To: Notmuch Test Suite Date: Fri, 05 Jan 2001 15:43:57 +0000 <> -<> <> <> <> -<> <> -(<> [<> -<> +<>. <>, <>; <>: +<>? <>! +(<>) [<>] +<>... <> <> -<> -<>"c def +<>)def +<> def <>def -<>"c"def -id:"ab c"def +<>def +<>def <>.def id:"abc " -<> +id:) id: -c<> +cid:xxx EOF test_expect_equal_file OUTPUT EXPECTED -- cgit v1.2.3