mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3410: return code in :confval:release
breaks html search
This commit is contained in:
parent
b9bba672ed
commit
387588a9d8
1
CHANGES
1
CHANGES
@ -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
|
||||||
--------
|
--------
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user