#NEWLINE# def getApi( self ) : #NEWLINE# #INDENT# field = ( 'api[%s]' % self . id ) #NEWLINE# apidata = self . project . getCache ( ) . read ( field , self . getModificationTime ( ) ) #NEWLINE# if ( not Text . supportsMarkdown ) : #NEWLINE# #INDENT# raise UserError ( 'Missing Markdown feature to convert package docs into HTML.' ) #NEWLINE# #UNINDENT# if ( apidata is None ) : #NEWLINE# #INDENT# apidata = Data . ApiData ( field . id ) #NEWLINE# apidata . main [ 'type' ] = 'Package' #NEWLINE# apidata . main [ 'doc' ] = Text . highlightCodeBlocks ( Text . markdownToHtml ( self . getText ( ) ) ) #NEWLINE# self . project . getCache ( ) . store ( field , apidata , self . getModificationTime ( ) ) #NEWLINE# #UNINDENT# return apidata