~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/worksheet/rst.py

  • Committer: Nick Chadwick
  • Date: 2009-03-10 12:36:08 UTC
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090310123608-xy6gfy6v3qjkdlig
Slightly modified the display of the list in the exercises view.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/python
1
2
#
2
3
# Natural Language Toolkit: Documentation generation script
3
4
#
1555
1556
        self.body.append('<exercise weight="1" src="')
1556
1557
 
1557
1558
    def depart_exercise(self, node):
1558
 
        self.body.append('"/>\n')
 
1559
        self.body.append('"/>')
1559
1560
 
1560
1561
    def visit_challenge(self, node):
1561
1562
        self.body.append('<exercise weight="0" src="')
1562
1563
 
1563
1564
    def depart_challenge(self, node):
1564
 
        self.body.append('"/>\n')
 
1565
        self.body.append('"/>')
1565
1566
 
1566
1567
    def visit_literal(self, node):
1567
1568
        """Process text to prevent tokens from wrapping."""
1696
1697
            writer=CustomizedHTMLWriter(), reader=CustomizedReader())
1697
1698
        match = _OUTPUT_RE.search(output)
1698
1699
        if match:
1699
 
            return "<div>" + match.group(1) + "</div>"
 
1700
            return match.group(1)
1700
1701
        else:
1701
1702
            raise ValueError('Could not process exercise definition')
1702
1703