Re-export docutils .. class:: as .. rst-class:: and un-document .. cssclass::.

This commit is contained in:
Georg Brandl
2010-02-28 19:30:30 +01:00
parent dc84392d22
commit 7f1eafb9a3
3 changed files with 10 additions and 5 deletions
-4
View File
@@ -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
+7
View File
@@ -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`.
+3 -1
View File
@@ -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)