| 1 | # Author: David Goodger, Dmitry Jemerov |
|---|
| 2 | # Contact: goodger@users.sourceforge.net |
|---|
| 3 | # Revision: $Revision: 4156 $ |
|---|
| 4 | # Date: $Date: 2005-12-08 05:43:13 +0100 (Thu, 08 Dec 2005) $ |
|---|
| 5 | # Copyright: This module has been placed in the public domain. |
|---|
| 6 | |
|---|
| 7 | """ |
|---|
| 8 | Directives for references and targets. |
|---|
| 9 | """ |
|---|
| 10 | |
|---|
| 11 | __docformat__ = 'reStructuredText' |
|---|
| 12 | |
|---|
| 13 | from docutils import nodes |
|---|
| 14 | from docutils.transforms import references |
|---|
| 15 | from docutils.parsers.rst import directives |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | def target_notes(name, arguments, options, content, lineno, |
|---|
| 19 | content_offset, block_text, state, state_machine): |
|---|
| 20 | """Target footnote generation.""" |
|---|
| 21 | pending = nodes.pending(references.TargetNotes) |
|---|
| 22 | pending.details.update(options) |
|---|
| 23 | state_machine.document.note_pending(pending) |
|---|
| 24 | nodelist = [pending] |
|---|
| 25 | return nodelist |
|---|
| 26 | |
|---|
| 27 | target_notes.options = {'class': directives.class_option} |
|---|