~ubuntu-branches/ubuntu/jaunty/python-docutils/jaunty

« back to all changes in this revision

Viewing changes to docutils/parsers/rst/directives/references.py

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2008-07-24 10:39:53 UTC
  • mfrom: (1.1.4 upstream) (3.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080724103953-8gh4uezg17g9ysgy
Tags: 0.5-2
* Upload docutils 0.5 to unstable
* Update rst.el to upstream Subversion r5596, which apparently fixes
  all its performance problems (17_speed_up_rst_el.dpatch, closes: #474941)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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) $
 
1
# $Id: references.py 4667 2006-07-12 21:40:56Z wiemann $
 
2
# Authors: David Goodger <goodger@python.org>; Dmitry Jemerov
5
3
# Copyright: This module has been placed in the public domain.
6
4
 
7
5
"""
12
10
 
13
11
from docutils import nodes
14
12
from docutils.transforms import references
 
13
from docutils.parsers.rst import Directive
15
14
from docutils.parsers.rst import directives
16
15
 
17
16
 
18
 
def target_notes(name, arguments, options, content, lineno,
19
 
                 content_offset, block_text, state, state_machine):
 
17
class TargetNotes(Directive):
 
18
 
20
19
    """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}
 
20
 
 
21
    option_spec = {'class': directives.class_option}
 
22
 
 
23
    def run(self):
 
24
        pending = nodes.pending(references.TargetNotes)
 
25
        pending.details.update(self.options)
 
26
        self.state_machine.document.note_pending(pending)
 
27
        nodelist = [pending]
 
28
        return nodelist