update blueprint linking regex
make changes to the blueprint regex so that word boundaries
are needed so that blueprints doesn't get picked up as the 's'
blueprint.
Also change the regex so that blueprint at the end of a sentence
doesn't pick up the next word in the next paragraph (i.e. the blueprint
stanza must all be on the same line)
Change-Id: Ic96d784ccfb16565ac61b102e018e663117c638a
Reviewed-on: https://review.openstack.org/17957
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
diff --git a/jeepyb/cmd/update_blueprint.py b/jeepyb/cmd/update_blueprint.py
index 96529ff..1f83124 100644
--- a/jeepyb/cmd/update_blueprint.py
+++ b/jeepyb/cmd/update_blueprint.py
@@ -40,7 +40,7 @@
GERRIT_SECURE_CONFIG_DEFAULT = '/home/gerrit2/review_site/etc/secure.config'
GERRIT_SECURE_CONFIG = os.environ.get('GERRIT_SECURE_CONFIG',
GERRIT_SECURE_CONFIG_DEFAULT)
-SPEC_RE = re.compile(r'(blueprint|bp)\s*[#:]?\s*(\S+)', re.I)
+SPEC_RE = re.compile(r'\b(blueprint|bp)\b[ \t]*[#:]?[ \t]*(\S+)', re.I)
BODY_RE = re.compile(r'^\s+.*$')