|
From: David G. <go...@py...> - 2017-12-21 16:48:12
|
On Thu, Dec 21, 2017 at 7:41 AM, <doc...@ay...> wrote: > According to the spec, the "class" attribute accepts class names and also > attribute values as directive arguments [1]. > > [1] http://docutils.sourceforge.net/docs/ref/rst/directives.html#class You misunderstand the spec. The class names *become* the "classes" attribute of its contents or the immediately-following element. > The examples for the "class" attribute only include class names but not > attribute values. This reST:: .. class:: special This is a "special" paragraph. becomes this doctree fragment (XML):: <paragraph classes="special">This is a "special" paragraph.</paragraph> > Is it really possible to assign attributes to a class name > by using the "class" directive? No, that doesn't make sense. David Goodger <http://python.net/~goodger> |