From: <fel...@us...> - 2005-05-27 23:30:46
|
Author: felixwiemann Date: 2005-05-28 01:30:32 +0200 (Sat, 28 May 2005) New Revision: 3394 Modified: trunk/docutils/docs/howto/rst-roles.txt Log: updated rst-roles howto to match new "classes" list attribute Modified: trunk/docutils/docs/howto/rst-roles.txt =================================================================== --- trunk/docutils/docs/howto/rst-roles.txt 2005-05-27 23:26:21 UTC (rev 3393) +++ trunk/docutils/docs/howto/rst-roles.txt 2005-05-27 23:30:32 UTC (rev 3394) @@ -199,8 +199,10 @@ prb = inliner.problematic(rawtext, rawtext, msg) return [prb], [msg] # Base URL mainly used by inliner.rfc_reference, so this is correct: - ref = inliner.rfc_url % rfcnum - node = nodes.reference(rawtext, 'RFC ' + text, refuri=ref, **options) + ref = inliner.document.settings.rfc_base_url + inliner.rfc_url % rfcnum + set_classes(options) + node = nodes.reference(rawtext, 'RFC ' + utils.unescape(text), refuri=ref, + **options) return [node], [] register_canonical_role('rfc-reference', rfc_reference_role) @@ -218,7 +220,9 @@ the "refuri" attribute of a "reference" element. 3. The ``options`` function parameter, a dictionary, may contain a - "class" customization attribute; it is passed through to the - "reference" element node constructor. + "class" customization attribute; it is interpreted and replaced + with a "classes" attribute by the ``set_classes()`` function. The + resulting "classes" attribute is passed through to the "reference" + element node constructor. .. _RFCs: http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=rfc&action=Search&sourceid=Mozilla-search |