~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to src/3rdparty/freetype/src/tools/docmaker/content.py

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#  Content (c) 2002, 2004, 2006, 2007, 2008 David Turner <david@freetype.org>
 
1
#  Content (c) 2002, 2004, 2006, 2007, 2008, 2009
 
2
#    David Turner <david@freetype.org>
2
3
#
3
4
#  This file contains routines used to parse the content of documentation
4
5
#  comment blocks and build more structured objects out of them.
153
154
            if mode == mode_code:
154
155
                m = re_code_end.match( l )
155
156
                if m and len( m.group( 1 ) ) <= margin:
156
 
                    # that's it, we finised the code sequence
 
157
                    # that's it, we finished the code sequence
157
158
                    code = DocCode( 0, cur_lines )
158
159
                    self.items.append( code )
159
160
                    margin    = -1
321
322
        self.blocks[block.name] = block
322
323
 
323
324
    def  process( self ):
324
 
        # lookup one block that contains a valid section description
 
325
        # look up one block that contains a valid section description
325
326
        for block in self.defs:
326
327
            title = block.get_markup_text( "title" )
327
328
            if title:
539
540
        while start < end and not string.strip( source[end] ):
540
541
            end = end - 1
541
542
 
542
 
        source = source[start:end + 1]
543
 
 
544
 
        self.code = source
 
543
        if start == end:
 
544
            self.code = []
 
545
        else:
 
546
            self.code = source[start:end + 1]
545
547
 
546
548
    def  location( self ):
547
549
        return self.source.location()