mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
parent
0875507497
commit
4c3c128e9b
1
CHANGES
1
CHANGES
@ -22,6 +22,7 @@ Bugs fixed
|
||||
if linkcheck_anchors enabled
|
||||
* #3004: Invalid link types "top" and "up" are used
|
||||
* #3009: Bad rendering of parsed-literals in LaTeX since Sphinx 1.4.4
|
||||
* #3000: ``option`` directive generates invalid HTML anchors
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
@ -174,16 +174,18 @@ class Cmdoption(ObjectDescription):
|
||||
if currprogram:
|
||||
targetname = '-' + currprogram + targetname
|
||||
targetname = 'cmdoption' + targetname
|
||||
signode['ids'].append(targetname)
|
||||
self.state.document.note_explicit_target(signode)
|
||||
signode['names'].append(targetname)
|
||||
|
||||
self.state.document.note_explicit_target(signode)
|
||||
for optname in signode.get('allnames', []):
|
||||
self.env.domaindata['std']['progoptions'][currprogram, optname] = \
|
||||
self.env.docname, targetname
|
||||
self.env.docname, signode['ids'][0]
|
||||
# create only one index entry for the whole option
|
||||
if optname == firstname:
|
||||
self.indexnode['entries'].append(
|
||||
('pair', _('%scommand line option; %s') %
|
||||
((currprogram and currprogram + ' ' or ''), sig),
|
||||
targetname, '', None))
|
||||
signode['ids'][0], '', None))
|
||||
|
||||
|
||||
class Program(Directive):
|
||||
|
@ -240,11 +240,11 @@ HTML_XPATH = {
|
||||
(".//td[@class='field-body']/ul/li/em", '^DuplicateType$'),
|
||||
(".//td[@class='field-body']/ul/li/em", tail_check(r'.* Some parameter')),
|
||||
# others
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-+p']/code/span",
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span",
|
||||
'perl'),
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-+p']/code/span",
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-p']/code/span",
|
||||
'\+p'),
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl--plugin.option']/code/span",
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-plugin-option']/code/span",
|
||||
'--plugin.option'),
|
||||
(".//a[@class='reference internal'][@href='#cmdoption-perl-arg-create-auth-token']"
|
||||
"/code/span",
|
||||
|
@ -631,7 +631,7 @@ def test_xml_builder(app, status, warning):
|
||||
yield (assert_elem,
|
||||
para2[3],
|
||||
['LINK TO', '--module', 'AND', '-m', '.'],
|
||||
['cmdoption--module', 'cmdoption-m'])
|
||||
['cmdoption-module', 'cmdoption-m'])
|
||||
yield (assert_elem,
|
||||
para2[4],
|
||||
['LINK TO', 'env2', 'AND', 'env1', '.'],
|
||||
|
Loading…
Reference in New Issue
Block a user