mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Re-export docutils .. class:: as .. rst-class:: and un-document .. cssclass::.
This commit is contained in:
@@ -187,10 +187,6 @@ The directives are:
|
||||
|
||||
The first way is the preferred one.
|
||||
|
||||
.. versionadded:: 0.4
|
||||
The standard reST directive ``class`` is now provided by Sphinx under
|
||||
the name ``cssclass``.
|
||||
|
||||
.. directive:: .. attribute:: name
|
||||
|
||||
Describes an object data attribute. The description should include
|
||||
|
||||
@@ -281,6 +281,7 @@ Docutils supports the following directives:
|
||||
|
||||
- :rstdir:`raw` (include raw target-format markup)
|
||||
- :rstdir:`include` (include reStructuredText from another file)
|
||||
- :rstdir:`class` (assign a class attribute to the next element) [1]_
|
||||
|
||||
* HTML specifics:
|
||||
|
||||
@@ -451,3 +452,9 @@ There are some problems one commonly runs into while authoring reST documents:
|
||||
|
||||
* **No nested inline markup:** Something like ``*see :func:`foo`*`` is not
|
||||
possible.
|
||||
|
||||
|
||||
.. rubric:: Footnotes
|
||||
|
||||
.. [1] When the default domain contains a :dir:`class` directive, this directive
|
||||
will be shadowed. Therefore, Sphinx re-exports it as :dir:`rst-class`.
|
||||
|
||||
@@ -380,6 +380,8 @@ directives.register_directive('hlist', HList)
|
||||
directives.register_directive('only', Only)
|
||||
|
||||
# register the standard rst class directive under a different name
|
||||
# only for backwards compatibility now
|
||||
from docutils.parsers.rst.directives.misc import Class
|
||||
# only for backwards compatibility now
|
||||
directives.register_directive('cssclass', Class)
|
||||
# new standard name when default-domain with "class" is in effect
|
||||
directives.register_directive('rst-class', Class)
|
||||
|
||||
Reference in New Issue
Block a user