diff --git a/docs/conf.py b/docs/conf.py index 3a9c66c..18b647d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,13 +2,12 @@ # # This file is execfile()d with the current directory set to its containing dir. -import os, sys, time, cgi +import re, os, sys, time, cgi sys.path.append(os.path.abspath("..")) from get_version import __version__ as hy_version -if hy_version.endswith(".dirty"): - # Read the Docs might dirty its checkout, so ignore this. - hy_version = hy_version[:-len(".dirty")] +# Read the Docs might dirty its checkout, so strip the dirty flag. +hy_version = re.sub('[+.]dirty\Z', '', hy_version) templates_path = ['_templates'] source_suffix = '.rst'