mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Update documentation and sphinx-build -N
option behavior for windows color console support. closes #1291.
This commit is contained in:
parent
6ab7a2cbec
commit
c8e0a8759d
2
CHANGES
2
CHANGES
@ -39,7 +39,7 @@ New features
|
|||||||
submodule documentation. Thanks to Wes Turner and Luc Saffre.
|
submodule documentation. Thanks to Wes Turner and Luc Saffre.
|
||||||
* #1434: Provide non-minified JS files for jquery.js and underscore.js to
|
* #1434: Provide non-minified JS files for jquery.js and underscore.js to
|
||||||
clarify the source of the minified files.
|
clarify the source of the minified files.
|
||||||
* PR#252: Windows color console support. Thanks to meu31.
|
* PR#252, #1291: Windows color console support. Thanks to meu31.
|
||||||
|
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
@ -154,8 +154,7 @@ The :program:`sphinx-build` script has several options:
|
|||||||
|
|
||||||
.. option:: -N
|
.. option:: -N
|
||||||
|
|
||||||
Do not emit colored output. (On Windows, colored output is disabled in any
|
Do not emit colored output.
|
||||||
case.)
|
|
||||||
|
|
||||||
.. option:: -v
|
.. option:: -v
|
||||||
|
|
||||||
|
@ -82,7 +82,6 @@ Standard options
|
|||||||
|
|
||||||
def main(argv):
|
def main(argv):
|
||||||
if not color_terminal():
|
if not color_terminal():
|
||||||
# Windows' poor cmd box doesn't understand ANSI sequences
|
|
||||||
nocolor()
|
nocolor()
|
||||||
|
|
||||||
# parse options
|
# parse options
|
||||||
|
@ -138,7 +138,6 @@ class BuildDoc(Command):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if not color_terminal():
|
if not color_terminal():
|
||||||
# Windows' poor cmd box doesn't understand ANSI sequences
|
|
||||||
nocolor()
|
nocolor()
|
||||||
if not self.verbose:
|
if not self.verbose:
|
||||||
status_stream = StringIO()
|
status_stream = StringIO()
|
||||||
|
@ -64,6 +64,8 @@ def color_terminal():
|
|||||||
|
|
||||||
|
|
||||||
def nocolor():
|
def nocolor():
|
||||||
|
if sys.platform == 'win32' and colorama is not None:
|
||||||
|
colorama.deinit()
|
||||||
codes.clear()
|
codes.clear()
|
||||||
|
|
||||||
def coloron():
|
def coloron():
|
||||||
|
Loading…
Reference in New Issue
Block a user