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

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-07-10 11:45:05 UTC
  • mfrom: (2.1.4 edgy)
  • Revision ID: james.westby@ubuntu.com-20060710114505-otkhqcslevewxmz5
Tags: 0.4-3
Added build dependency on python-central (closes: #377580).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Author: David Goodger
2
2
# Contact: goodger@users.sourceforge.net
3
 
# Revision: $Revision: 1.6 $
4
 
# Date: $Date: 2003/05/24 20:47:13 $
 
3
# Revision: $Revision: 3155 $
 
4
# Date: $Date: 2005-04-02 23:57:06 +0200 (Sat, 02 Apr 2005) $
5
5
# Copyright: This module has been placed in the public domain.
6
6
 
7
7
"""
30
30
        admonition_node += nodes.title(title_text, '', *textnodes)
31
31
        admonition_node += messages
32
32
        if options.has_key('class'):
33
 
            class_value = options['class']
 
33
            classes = options['class']
34
34
        else:
35
 
            class_value = 'admonition-' + nodes.make_id(title_text)
36
 
        admonition_node.set_class(class_value)
 
35
            classes = ['admonition-' + nodes.make_id(title_text)]
 
36
        admonition_node['classes'] += classes
37
37
    state.nested_parse(content, content_offset, admonition_node)
38
38
    return [admonition_node]
39
39