mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #3388 from smheidrich/autosectionlabel_prefix_document1
Added autosectionlabel_prefix_document config option
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
extensions = ['sphinx.ext.autosectionlabel']
|
||||
master_doc = 'index'
|
||||
autosectionlabel_prefix_document = True
|
||||
@@ -0,0 +1,25 @@
|
||||
=========================================
|
||||
test-ext-autosectionlabel-prefix-document
|
||||
=========================================
|
||||
|
||||
|
||||
Introduce of Sphinx
|
||||
===================
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
For Windows users
|
||||
-----------------
|
||||
|
||||
For UNIX users
|
||||
--------------
|
||||
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
* :ref:`index:Introduce of Sphinx`
|
||||
* :ref:`index:Installation`
|
||||
* :ref:`index:For Windows users`
|
||||
* :ref:`index:For UNIX users`
|
||||
@@ -34,3 +34,9 @@ def test_autosectionlabel_html(app, status, warning):
|
||||
html = ('<li><a class="reference internal" href="#for-unix-users">'
|
||||
'<span class="std std-ref">For UNIX users</span></a></li>')
|
||||
assert re.search(html, content, re.S)
|
||||
|
||||
|
||||
# Re-use test definition from above, just change the test root directory
|
||||
@pytest.mark.sphinx('html', testroot='ext-autosectionlabel-prefix-document')
|
||||
def test_autosectionlabel_prefix_document_html(app, status, warning):
|
||||
return test_autosectionlabel_html(app, status, warning)
|
||||
|
||||
Reference in New Issue
Block a user