mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable'
This commit is contained in:
commit
496ff70f4a
19
CHANGES
19
CHANGES
@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
Release 1.6 (in development)
|
||||
============================
|
||||
|
||||
@ -95,7 +96,7 @@ Deprecated
|
||||
patch them. In particular the ``\makesavenoteenv`` macro is not in use anymore
|
||||
and its definition will be removed at Sphinx 1.7.
|
||||
|
||||
Release 1.5.3 (in development)
|
||||
Release 1.5.4 (in development)
|
||||
==============================
|
||||
|
||||
Incompatible changes
|
||||
@ -107,10 +108,23 @@ Deprecated
|
||||
Features added
|
||||
--------------
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
Release 1.5.3 (released Feb 26, 2017)
|
||||
=====================================
|
||||
|
||||
Features added
|
||||
--------------
|
||||
|
||||
* Support requests-2.0.0 (experimental) (refs: #3367)
|
||||
* (latex) PDF page margin dimensions may be customized (refs: #3387)
|
||||
* ``literalinclude`` directive allows combination of ``:pyobject:`` and
|
||||
``:lines:`` options (refs: #3416)
|
||||
* #3400: make-mode doesn't use subprocess on building docs
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
@ -134,9 +148,6 @@ Bugs fixed
|
||||
* #3418: Search button is misaligned in nature and pyramid theme
|
||||
* #3421: Could not translate a caption of tables
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
Release 1.5.2 (released Jan 22, 2017)
|
||||
=====================================
|
||||
|
||||
|
@ -19,9 +19,9 @@ from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
from os import path
|
||||
from subprocess import call
|
||||
|
||||
import sphinx
|
||||
from sphinx import cmdline
|
||||
from sphinx.util.console import bold, blue # type: ignore
|
||||
from sphinx.util.osutil import cd, rmtree
|
||||
|
||||
@ -277,20 +277,12 @@ class Make(object):
|
||||
if doctreedir is None:
|
||||
doctreedir = self.builddir_join('doctrees')
|
||||
|
||||
orig_cmd = sys.argv[0]
|
||||
if sys.platform == 'win32' and orig_cmd.endswith('.exe'):
|
||||
# win32: 'sphinx-build.exe'
|
||||
cmd = [orig_cmd]
|
||||
elif sys.platform == 'win32' and os.path.splitext(orig_cmd)[1] == '':
|
||||
# win32: 'sphinx-build' without extension
|
||||
cmd = [orig_cmd + '.exe']
|
||||
else:
|
||||
# win32: 'sphinx-build.py'
|
||||
# linux, mac: 'sphinx-build' or 'sphinx-build.py'
|
||||
cmd = [sys.executable, orig_cmd]
|
||||
|
||||
return call(cmd + ['-b', builder] + opts + # type: ignore
|
||||
['-d', doctreedir, self.srcdir, self.builddir_join(builder)]) # type: ignore # NOQA
|
||||
args = [sys.argv[0],
|
||||
'-b', builder,
|
||||
'-d', doctreedir,
|
||||
self.srcdir,
|
||||
self.builddir_join(builder)]
|
||||
return cmdline.main(args + opts)
|
||||
|
||||
|
||||
def run_make_mode(args):
|
||||
|
@ -681,6 +681,10 @@ class HTMLTranslator(BaseTranslator):
|
||||
# type: (nodes.Node) -> None
|
||||
self.body.append('</td>')
|
||||
|
||||
def visit_option_group(self, node):
|
||||
BaseTranslator.visit_option_group(self, node)
|
||||
self.context[-2] = self.context[-2].replace(' ', ' ')
|
||||
|
||||
def bulk_text_processor(self, text):
|
||||
# type: (unicode) -> unicode
|
||||
return text
|
||||
@ -957,10 +961,6 @@ class SmartyPantsHTMLTranslator(HTMLTranslator):
|
||||
self.no_smarty -= 1
|
||||
HTMLTranslator.depart_option(self, node)
|
||||
|
||||
def visit_option_group(self, node):
|
||||
HTMLTranslator.visit_option_group(self, node)
|
||||
self.context[-2] = self.context[-2].replace(' ', ' ')
|
||||
|
||||
def bulk_text_processor(self, text):
|
||||
# type: (unicode) -> unicode
|
||||
if self.no_smarty <= 0:
|
||||
|
5
tests/roots/test-html_entity/conf.py
Normal file
5
tests/roots/test-html_entity/conf.py
Normal file
@ -0,0 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
master_doc = 'index'
|
||||
html_theme = 'classic'
|
||||
exclude_patterns = ['_build']
|
31
tests/roots/test-html_entity/index.rst
Normal file
31
tests/roots/test-html_entity/index.rst
Normal file
@ -0,0 +1,31 @@
|
||||
.. _index:
|
||||
|
||||
test-html_entity (#3450)
|
||||
=========================
|
||||
|
||||
Empty cell
|
||||
----------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
- * un
|
||||
*
|
||||
* trois
|
||||
|
||||
Return description in function signature
|
||||
----------------------------------------
|
||||
|
||||
.. py:function:: test() -> string
|
||||
|
||||
rarr
|
||||
|
||||
Field list that has long name (over 14 characters)
|
||||
--------------------------------------------------
|
||||
|
||||
:abcdefghijklmnopqrstuvwxyz: fieldlist
|
||||
|
||||
Option list that has long name (over 14 characters)
|
||||
---------------------------------------------------
|
||||
|
||||
-a all
|
||||
-b long_long_file use file
|
@ -1140,3 +1140,12 @@ def test_html_sourcelink_suffix(app):
|
||||
assert '<a href="_sources/images.txt"' in content_images
|
||||
assert (app.outdir / '_sources' / 'otherext.foo').exists()
|
||||
assert (app.outdir / '_sources' / 'images.txt').exists()
|
||||
|
||||
|
||||
@pytest.mark.sphinx('html', testroot='html_entity')
|
||||
def test_html_entity(app):
|
||||
app.builder.build_all()
|
||||
valid_entities = {'amp', 'lt', 'gt', 'quot', 'apos'}
|
||||
content = (app.outdir / 'index.html').text()
|
||||
for entity in re.findall(r'&([a-z]+);', content, re.M):
|
||||
assert entity not in valid_entities
|
||||
|
Loading…
Reference in New Issue
Block a user