mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch '4.x' into 6525_linkcheck_warn_redirects
This commit is contained in:
4
tests/roots/test-domain-c/field-role.rst
Normal file
4
tests/roots/test-domain-c/field-role.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
.. c:function:: void f(int a, int *b)
|
||||
|
||||
:param int a:
|
||||
:param int* b:
|
||||
5
tests/roots/test-domain-cpp/field-role.rst
Normal file
5
tests/roots/test-domain-cpp/field-role.rst
Normal file
@@ -0,0 +1,5 @@
|
||||
.. cpp:function:: void f()
|
||||
|
||||
:throws int:
|
||||
:throws int*:
|
||||
|
||||
@@ -4,5 +4,9 @@ domain-py-smart_reference
|
||||
.. py:class:: Name
|
||||
:module: foo
|
||||
|
||||
:param name: blah blah
|
||||
:type name: foo.Name
|
||||
:param age: blah blah
|
||||
:type age: foo.Age
|
||||
|
||||
.. py:function:: hello(name: foo.Name, age: foo.Age)
|
||||
|
||||
@@ -8,3 +8,4 @@ class Bar(Foo):
|
||||
def __init__(self):
|
||||
self.attr2 = None #: docstring bar
|
||||
self.attr3 = None #: docstring bar
|
||||
self.attr4 = None
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
from typing import Any, Tuple, Union
|
||||
|
||||
CONST1: int
|
||||
CONST2: int = 1
|
||||
|
||||
|
||||
def incr(a: int, b: int = 1) -> int:
|
||||
return a + b
|
||||
@@ -11,6 +14,9 @@ def decr(a, b = 1):
|
||||
|
||||
|
||||
class Math:
|
||||
CONST1: int
|
||||
CONST2: int = 1
|
||||
|
||||
def __init__(self, s: str, o: Any = None) -> None:
|
||||
pass
|
||||
|
||||
@@ -32,6 +38,10 @@ class Math:
|
||||
# type: (...) -> None
|
||||
return
|
||||
|
||||
@property
|
||||
def prop(self) -> int:
|
||||
return 0
|
||||
|
||||
|
||||
def tuple_args(x: Tuple[int, Union[int, str]]) -> Tuple[int, int]:
|
||||
pass
|
||||
|
||||
0
tests/roots/test-latex-container/conf.py
Normal file
0
tests/roots/test-latex-container/conf.py
Normal file
4
tests/roots/test-latex-container/index.rst
Normal file
4
tests/roots/test-latex-container/index.rst
Normal file
@@ -0,0 +1,4 @@
|
||||
.. container:: classname
|
||||
|
||||
text
|
||||
|
||||
@@ -13,6 +13,8 @@ Some additional anchors to exercise ignore code
|
||||
* `Complete nonsense <https://localhost:7777/doesnotexist>`_
|
||||
* `Example valid local file <conf.py>`_
|
||||
* `Example invalid local file <path/to/notfound>`_
|
||||
* https://github.com/sphinx-doc/sphinx#documentation
|
||||
* https://github.com/sphinx-doc/sphinx#user-content-testing
|
||||
|
||||
.. image:: https://www.google.com/image.png
|
||||
.. figure:: https://www.google.com/image2.png
|
||||
|
||||
5
tests/roots/test-remote-logo/conf.py
Normal file
5
tests/roots/test-remote-logo/conf.py
Normal file
@@ -0,0 +1,5 @@
|
||||
latex_documents = [
|
||||
('index', 'test.tex', 'The basic Sphinx documentation for testing', 'Sphinx', 'report')
|
||||
]
|
||||
html_logo = "https://www.python.org/static/img/python-logo.png"
|
||||
html_favicon = "https://www.python.org/static/favicon.ico"
|
||||
32
tests/roots/test-remote-logo/index.rst
Normal file
32
tests/roots/test-remote-logo/index.rst
Normal file
@@ -0,0 +1,32 @@
|
||||
The basic Sphinx documentation for testing
|
||||
==========================================
|
||||
|
||||
Sphinx is a tool that makes it easy to create intelligent and beautiful
|
||||
documentation for Python projects (or other documents consisting of multiple
|
||||
reStructuredText sources), written by Georg Brandl. It was originally created
|
||||
for the new Python documentation, and has excellent facilities for Python
|
||||
project documentation, but C/C++ is supported as well, and more languages are
|
||||
planned.
|
||||
|
||||
Sphinx uses reStructuredText as its markup language, and many of its strengths
|
||||
come from the power and straightforwardness of reStructuredText and its parsing
|
||||
and translating suite, the Docutils.
|
||||
|
||||
features
|
||||
--------
|
||||
|
||||
Among its features are the following:
|
||||
|
||||
* Output formats: HTML (including derivative formats such as HTML Help, Epub
|
||||
and Qt Help), plain text, manual pages and LaTeX or direct PDF output
|
||||
using rst2pdf
|
||||
* Extensive cross-references: semantic markup and automatic links
|
||||
for functions, classes, glossary terms and similar pieces of information
|
||||
* Hierarchical structure: easy definition of a document tree, with automatic
|
||||
links to siblings, parents and children
|
||||
* Automatic indices: general index as well as a module index
|
||||
* Code handling: automatic highlighting using the Pygments highlighter
|
||||
* Flexible HTML output using the Jinja 2 templating engine
|
||||
* Various extensions are available, e.g. for automatic testing of snippets
|
||||
and inclusion of appropriately formatted docstrings
|
||||
* Setuptools integration
|
||||
@@ -61,3 +61,10 @@ term1
|
||||
|
||||
term2 (**stronged partially**)
|
||||
description
|
||||
|
||||
Samp tests
|
||||
----------
|
||||
|
||||
:samp:`{variable_only}`
|
||||
:samp:`{variable} and text`
|
||||
:samp:`Show {variable} in the middle`
|
||||
|
||||
Reference in New Issue
Block a user