Fix #3410: return code in :confval:release breaks html search

This commit is contained in:
Takeshi KOMIYA 2017-02-15 18:16:35 +09:00
parent b9bba672ed
commit 387588a9d8
2 changed files with 5 additions and 1 deletions

View File

@ -27,6 +27,7 @@ Bugs fixed
gets wrong PDF page dimensions gets wrong PDF page dimensions
* #3399: quickstart: conf.py was not overwritten by template * #3399: quickstart: conf.py was not overwritten by template
* #3366: option directive does not allow punctuations * #3366: option directive does not allow punctuations
* #3410: return code in :confval:`release` breaks html search
Testing Testing
-------- --------

View File

@ -10,6 +10,7 @@
""" """
import os import os
import re
import sys import sys
import zlib import zlib
import codecs import codecs
@ -50,6 +51,8 @@ INVENTORY_FILENAME = 'objects.inv'
#: the filename for the "last build" file (for serializing builders) #: the filename for the "last build" file (for serializing builders)
LAST_BUILD_FILENAME = 'last_build' LAST_BUILD_FILENAME = 'last_build'
return_codes_re = re.compile('[\r\n]+')
def get_stable_hash(obj): def get_stable_hash(obj):
""" """
@ -329,7 +332,7 @@ class StandaloneHTMLBuilder(Builder):
self.globalcontext = dict( self.globalcontext = dict(
embedded = self.embedded, embedded = self.embedded,
project = self.config.project, project = self.config.project,
release = self.config.release, release = return_codes_re.sub('', self.config.release),
version = self.config.version, version = self.config.version,
last_updated = self.last_updated, last_updated = self.last_updated,
copyright = self.config.copyright, copyright = self.config.copyright,