mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix warning in CHANGES
This commit is contained in:
commit
7a81169e4c
16
CHANGES
16
CHANGES
@ -64,18 +64,18 @@ Incompatible changes
|
||||
|
||||
* latex, inclusion of non-inline images from image directive resulted in
|
||||
non-coherent whitespaces depending on original image width; new behaviour
|
||||
by necessity from earlier one in some cases. (ref: #2672)
|
||||
by necessity differs from earlier one in some cases. (ref: #2672)
|
||||
* latex, use of ``\includegraphics`` to refer to Sphinx custom variant is
|
||||
deprecated; in future it will revert to original LaTeX macro, custom one has
|
||||
already alternative name ``\sphinxincludegraphics``.
|
||||
deprecated; in future it will revert to original LaTeX macro, custom one
|
||||
already has alternative name ``\sphinxincludegraphics``.
|
||||
|
||||
Features added
|
||||
--------------
|
||||
|
||||
* new config option ``latex_keep_old_macro_names``, defaults to True. If False,
|
||||
let macros (for text styling) be defined only with ``\sphinx``-prefixed names.
|
||||
lets macros (for text styling) be defined only with ``\sphinx``-prefixed names.
|
||||
* latex writer allows user customization of "shadowed" boxes (topics), via
|
||||
three length variables
|
||||
three length variables.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
@ -85,6 +85,10 @@ Bugs fixed
|
||||
* #2684: `sphinx.ext.intersphinx` crashes with six-1.4.1
|
||||
* #2679: ``float`` package needed for ``'figure_align': 'H'`` latex option
|
||||
* #2671: image directive may lead to inconsistent spacing in pdf
|
||||
* #2705: ``toctree`` generates empty bullet_list if ``:titlesonly:`` specified
|
||||
* #2479: `sphinx.ext.viewcode` uses python2 highlighter by default
|
||||
* #2700: HtmlHelp builder has hard coded index.html
|
||||
* latex, since 1.4.4 inline literal text is followed by spurious space
|
||||
|
||||
|
||||
Release 1.4.4 (released Jun 12, 2016)
|
||||
@ -111,6 +115,8 @@ Bugs fixed
|
||||
* Failed to build PDF with framed.sty 0.95
|
||||
* Sphinx now bundles needspace.sty
|
||||
* #2666: C++, properly look up nested names involving constructors.
|
||||
* #2579: Could not refer a label including both spaces and colons via
|
||||
`sphinx.ext.intersphinx`
|
||||
|
||||
|
||||
Release 1.4.3 (released Jun 5, 2016)
|
||||
|
@ -63,7 +63,7 @@ Binary Index=No
|
||||
Compiled file=%(outname)s.chm
|
||||
Contents file=%(outname)s.hhc
|
||||
Default Window=%(outname)s
|
||||
Default topic=index.html
|
||||
Default topic=%(master_doc)s
|
||||
Display compile progress=No
|
||||
Full text search stop list file=%(outname)s.stp
|
||||
Full-text search=Yes
|
||||
@ -73,7 +73,7 @@ Title=%(title)s
|
||||
|
||||
[WINDOWS]
|
||||
%(outname)s="%(title)s","%(outname)s.hhc","%(outname)s.hhk",\
|
||||
"index.html","index.html",,,,,0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0
|
||||
"%(master_doc)s","%(master_doc)s",,,,,0x63520,220,0x10384e,[0,0,1024,768],,,,,,,0
|
||||
|
||||
[FILES]
|
||||
'''
|
||||
@ -204,11 +204,14 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
|
||||
|
||||
self.info('writing project file...')
|
||||
with self.open_file(outdir, outname+'.hhp') as f:
|
||||
f.write(project_template % {'outname': outname,
|
||||
'title': self.config.html_title,
|
||||
'version': self.config.version,
|
||||
'project': self.config.project,
|
||||
'lcid': self.lcid})
|
||||
f.write(project_template % {
|
||||
'outname': outname,
|
||||
'title': self.config.html_title,
|
||||
'version': self.config.version,
|
||||
'project': self.config.project,
|
||||
'lcid': self.lcid,
|
||||
'master_doc': self.config.master_doc + self.out_suffix
|
||||
})
|
||||
if not outdir.endswith(os.sep):
|
||||
outdir += os.sep
|
||||
olen = len(outdir)
|
||||
@ -225,7 +228,7 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
|
||||
f.write(contents_header)
|
||||
# special books
|
||||
f.write('<LI> ' + object_sitemap % (self.config.html_short_title,
|
||||
'index.html'))
|
||||
self.config.master_doc + self.out_suffix))
|
||||
for indexname, indexcls, content, collapse in self.domain_indices:
|
||||
f.write('<LI> ' + object_sitemap % (indexcls.localname,
|
||||
'%s.html' % indexname))
|
||||
|
@ -279,6 +279,9 @@ class CDomain(Domain):
|
||||
typ, target, node, contnode):
|
||||
# strip pointer asterisk
|
||||
target = target.rstrip(' *')
|
||||
# becase TypedField can generate xrefs
|
||||
if target in CObject.stopwords:
|
||||
return contnode
|
||||
if target not in self.data['objects']:
|
||||
return None
|
||||
obj = self.data['objects'][target]
|
||||
|
@ -1438,7 +1438,10 @@ class BuildEnvironment:
|
||||
# nodes with length 1 don't have any children anyway
|
||||
if len(toplevel) > 1:
|
||||
subtrees = toplevel.traverse(addnodes.toctree)
|
||||
toplevel[1][:] = subtrees
|
||||
if subtrees:
|
||||
toplevel[1][:] = subtrees
|
||||
else:
|
||||
toplevel.pop(1)
|
||||
# resolve all sub-toctrees
|
||||
for subtocnode in toc.traverse(addnodes.toctree):
|
||||
if not (subtocnode.get('hidden', False) and
|
||||
@ -1484,6 +1487,9 @@ class BuildEnvironment:
|
||||
_toctree_add_classes(newnode, 1)
|
||||
self._toctree_prune(newnode, 1, prune and maxdepth or 0, collapse)
|
||||
|
||||
if len(newnode[-1]) == 0: # No titles found
|
||||
return None
|
||||
|
||||
# set the target paths in the toctrees (they are not known at TOC
|
||||
# generation time)
|
||||
for refnode in newnode.traverse(nodes.reference):
|
||||
|
@ -106,7 +106,7 @@ def read_inventory_v2(f, uri, join, bufsize=16*1024):
|
||||
|
||||
for line in split_lines(read_chunks()):
|
||||
# be careful to handle names with embedded spaces correctly
|
||||
m = re.match(r'(?x)(.+?)\s+(\S*:\S*)\s+(\S+)\s+(\S+)\s+(.*)',
|
||||
m = re.match(r'(?x)(.+?)\s+(\S*:\S*)\s+(-?\d+)\s+(\S+)\s+(.*)',
|
||||
line.rstrip())
|
||||
if not m:
|
||||
continue
|
||||
|
@ -139,8 +139,8 @@ def collect_pages(app):
|
||||
# construct a page name for the highlighted source
|
||||
pagename = '_modules/' + modname.replace('.', '/')
|
||||
# highlight the source using the builder's highlighter
|
||||
if env.config.highlight_language == 'python3':
|
||||
lexer = 'python3'
|
||||
if env.config.highlight_language in ('python3', 'default'):
|
||||
lexer = env.config.highlight_language
|
||||
else:
|
||||
lexer = 'python'
|
||||
highlighted = highlighter.highlight_block(code, lexer, linenos=False)
|
||||
|
@ -162,7 +162,7 @@
|
||||
% let \sphinxcode and \sphinxbfcode use straight quotes. \@noligs patched by upquote,
|
||||
% but needs protection in "moving arguments" such as for captions.
|
||||
% Use \scantokens to handle e.g. \item[{\sphinxcode{'fontenc'}}]
|
||||
\DeclareRobustCommand{\sphinxcode}[1]{{\@noligs\scantokens{\texttt{#1}}}}
|
||||
\DeclareRobustCommand{\sphinxcode}[1]{{\@noligs\scantokens{\texttt{#1}\relax}}}
|
||||
\newcommand{\sphinxbfcode}[1]{\sphinxcode{\bfseries#1}}
|
||||
\newcommand{\sphinxemail}[1]{\textsf{#1}}
|
||||
\newcommand{\sphinxtablecontinued}[1]{\textsf{#1}}
|
||||
@ -1005,7 +1005,7 @@
|
||||
}
|
||||
% robustified case needs special treatment
|
||||
\newcommand\code{}\let\code\relax
|
||||
\DeclareRobustCommand{\code}[1]{{\@noligs\scantokens{\texttt{#1}}}}
|
||||
\DeclareRobustCommand{\code}[1]{{\@noligs\scantokens{\texttt{#1}\relax}}}
|
||||
\def\sphinxcode{\code}%
|
||||
\fi
|
||||
|
||||
|
@ -43,6 +43,7 @@ module2 py:module 0 foo.html#module-$ -
|
||||
module1.func py:function 1 sub/foo.html#$ -
|
||||
CFunc c:function 2 cfunc.html#CFunc -
|
||||
a term std:term -1 glossary.html#term-a-term -
|
||||
a term including:colon std:term -1 glossary.html#term-a-term-including-colon -
|
||||
'''.encode('utf-8'))
|
||||
|
||||
|
||||
@ -78,6 +79,8 @@ def test_read_inventory_v2():
|
||||
assert invdata1['c:function']['CFunc'][2] == '/util/cfunc.html#CFunc'
|
||||
assert invdata1['std:term']['a term'][2] == \
|
||||
'/util/glossary.html#term-a-term'
|
||||
assert invdata1['std:term']['a term including:colon'][2] == \
|
||||
'/util/glossary.html#term-a-term-including-colon'
|
||||
|
||||
|
||||
@with_app()
|
||||
|
Loading…
Reference in New Issue
Block a user