Added link and underline sections to base and html docgen types; defaults to silent pass so that we can add to other docgen types without breaking anything yet
svn: r13587
This commit is contained in:
		@@ -249,3 +249,32 @@ class TextDoc(object):
 | 
			
		||||
        @param alt: an alternative text to use. Useful for eg html reports
 | 
			
		||||
        """
 | 
			
		||||
        raise NotImplementedError
 | 
			
		||||
    
 | 
			
		||||
    def start_link(self, link):
 | 
			
		||||
        """
 | 
			
		||||
        Start a link section. This defaults to underlining.
 | 
			
		||||
        @param link: should be an item that makes sense in this
 | 
			
		||||
                     docgen type, if it implements linking.
 | 
			
		||||
        """
 | 
			
		||||
        self.start_underline()
 | 
			
		||||
 | 
			
		||||
    def stop_link(self):
 | 
			
		||||
        """
 | 
			
		||||
        Stop the link section. Defaults to stoppping the underlining
 | 
			
		||||
        for docgen types that don't support links.
 | 
			
		||||
        """
 | 
			
		||||
        self.stop_underline()
 | 
			
		||||
 | 
			
		||||
    def start_underline(self):
 | 
			
		||||
        """
 | 
			
		||||
        Start a section of underlining. This passes without error
 | 
			
		||||
        so that docgen types are not required to have this.
 | 
			
		||||
        """
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
    def stop_underline(self):
 | 
			
		||||
        """
 | 
			
		||||
        Stops a section of underlining. This passes without error
 | 
			
		||||
        so that docgen ntypes are not required to have this.
 | 
			
		||||
        """
 | 
			
		||||
        pass
 | 
			
		||||
 
 | 
			
		||||
@@ -541,3 +541,27 @@ class HtmlDoc(BaseDoc, TextDoc):
 | 
			
		||||
        overwrite base method so page break has no effect
 | 
			
		||||
        """
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
    def start_link(self, link):
 | 
			
		||||
        """
 | 
			
		||||
        Starts a section to add a link. Link is a URI.
 | 
			
		||||
        """
 | 
			
		||||
        self.htmllist += [Html('a', href=link)]
 | 
			
		||||
 | 
			
		||||
    def stop_link(self):
 | 
			
		||||
        """
 | 
			
		||||
        Stop a section of a link.
 | 
			
		||||
        """
 | 
			
		||||
        self.__reduce_list()
 | 
			
		||||
 | 
			
		||||
    def start_underline(self):
 | 
			
		||||
        """
 | 
			
		||||
        Starts a section of underlining.
 | 
			
		||||
        """
 | 
			
		||||
        self.htmllist += [Html('u')]
 | 
			
		||||
 | 
			
		||||
    def stop_underline(self):
 | 
			
		||||
        """
 | 
			
		||||
        Stop underlining.
 | 
			
		||||
        """
 | 
			
		||||
        self.__reduce_list()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user