def markdown(self,md,project):
if len(self.doc) > <NUM_LIT:0>:<EOL><INDENT>if len(self.doc) == <NUM_LIT:1> and '<STR_LIT::>' in self.doc[<NUM_LIT:0>]:<EOL><INDENT>words = self.doc[<NUM_LIT:0>].split('<STR_LIT::>')[<NUM_LIT:0>].strip()<EOL>if words.lower() not in ['<STR_LIT>','<STR_LIT:date>','<STR_LIT>','<STR_LIT:version>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>','<STR_LIT>']:<EOL><INDENT>self.doc.insert(<NUM_LIT:0>,'<STR_LIT>')<EOL><DEDENT>self.doc.append('<STR_LIT>')<EOL><DEDENT>self.doc = '<STR_LIT:\n>'.join(self.doc)<EOL>self.doc = md.convert(self.doc)<EOL>self.meta = md.Meta<EOL>md.reset()<EOL>md.Meta = {}<EOL><DEDENT>else:<EOL><INDENT>if self.settings['<STR_LIT>'].lower() == '<STR_LIT:true>' and self.obj != '<STR_LIT>' and self.obj != '<STR_LIT>':<EOL><INDENT>print('<STR_LIT>'.format(self.obj, self.name, self.hierarchy[<NUM_LIT:0>].name))<EOL><DEDENT>self.doc = "<STR_LIT>"<EOL>self.meta = {}<EOL><DEDENT>if self.parent:<EOL><INDENT>self.display = self.parent.display<EOL><DEDENT>for key in self.meta:<EOL><INDENT>if key == '<STR_LIT>':<EOL><INDENT>tmp = [ item.lower() for item in self.meta[key] ]<EOL>if type(self) == FortranSourceFile:<EOL><INDENT>while '<STR_LIT:none>' in tmp:<EOL><INDENT>tmp.remove('<STR_LIT:none>')<EOL><DEDENT><DEDENT>if len(tmp) == <NUM_LIT:0>:<EOL><INDENT>pass<EOL><DEDENT>elif '<STR_LIT:none>' in tmp:<EOL><INDENT>self.display = []<EOL><DEDENT>elif '<STR_LIT>' not in tmp and '<STR_LIT>' not in tmp and '<STR_LIT>' not in tmp:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>self.display = tmp<EOL><DEDENT><DEDENT>elif len(self.meta[key]) == <NUM_LIT:1>:<EOL><INDENT>self.meta[key] = self.meta[key][<NUM_LIT:0>]<EOL><DEDENT>elif key == '<STR_LIT>':<EOL><INDENT>self.meta[key] = '<STR_LIT:\n>'.join(self.meta[key])<EOL><DEDENT><DEDENT>if hasattr(self,'<STR_LIT>'): self.meta['<STR_LIT>'] = self.num_lines<EOL>self.doc = ford.utils.sub_macros(ford.utils.sub_notes(self.doc),self.base_url)<EOL>if '<STR_LIT>' in self.meta:<EOL><INDENT>self.meta['<STR_LIT>'] = md.convert(self.meta['<STR_LIT>'])<EOL>self.meta['<STR_LIT>'] = ford.utils.sub_macros(ford.utils.sub_notes(self.meta['<STR_LIT>']),self.base_url)<EOL><DEDENT>elif PARA_CAPTURE_RE.search(self.doc):<EOL><INDENT>if self.get_url() == None:<EOL><INDENT>self.meta['<STR_LIT>'] = self.doc<EOL><DEDENT>else:<EOL><INDENT>self.meta['<STR_LIT>'] = PARA_CAPTURE_RE.search(self.doc).group()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.meta['<STR_LIT>'] = '<STR_LIT>'<EOL><DEDENT>if self.meta['<STR_LIT>'].strip() != self.doc.strip():<EOL><INDENT>self.meta['<STR_LIT>'] += '<STR_LIT>'.format(self.get_url())<EOL><DEDENT>if '<STR_LIT>' not in self.meta:<EOL><INDENT>self.meta['<STR_LIT>'] = self.settings['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>self.meta['<STR_LIT>'] = self.meta['<STR_LIT>'].lower()<EOL><DEDENT>if '<STR_LIT>' not in self.meta:<EOL><INDENT>self.meta['<STR_LIT>'] = self.settings['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' not in self.meta:<EOL><INDENT>self.meta['<STR_LIT>'] = self.settings['<STR_LIT>']<EOL><DEDENT>if self.obj == '<STR_LIT>' or self.obj == '<STR_LIT:type>' or self.obj == '<STR_LIT>':<EOL><INDENT>if '<STR_LIT:source>' not in self.meta:<EOL><INDENT>self.meta['<STR_LIT:source>'] = self.settings['<STR_LIT:source>'].lower()<EOL><DEDENT>else:<EOL><INDENT>self.meta['<STR_LIT:source>'] = self.meta['<STR_LIT:source>'].lower()<EOL><DEDENT>if self.meta['<STR_LIT:source>'] == '<STR_LIT:true>':<EOL><INDENT>if self.obj == '<STR_LIT>':<EOL><INDENT>obj = self.proctype.lower()<EOL><DEDENT>else:<EOL><INDENT>obj = self.obj<EOL><DEDENT>regex = re.compile(self.SRC_CAPTURE_STR.format(obj,self.name), re.IGNORECASE|re.DOTALL|re.MULTILINE)<EOL>match = regex.search(self.hierarchy[<NUM_LIT:0>].raw_src)<EOL>if match:<EOL><INDENT>self.src = highlight(match.group(),FortranLexer(),HtmlFormatter())<EOL><DEDENT>else:<EOL><INDENT>self.src = '<STR_LIT>'<EOL>if self.settings['<STR_LIT>'].lower() == '<STR_LIT:true>':<EOL><INDENT>print('<STR_LIT>'.format(self.obj, self.name, self.hierarchy[<NUM_LIT:0>].name))<EOL><DEDENT><DEDENT><DEDENT><DEDENT>if self.obj == '<STR_LIT>':<EOL><INDENT>if '<STR_LIT>' not in self.meta:<EOL><INDENT>self.meta['<STR_LIT>'] = self.settings['<STR_LIT>'].lower()<EOL><DEDENT>else:<EOL><INDENT>self.meta['<STR_LIT>'] = self.meta['<STR_LIT>'].lower()<EOL><DEDENT><DEDENT>for item in self.iterator('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', '<STR_LIT:args>', '<STR_LIT>'):<EOL><INDENT>if isinstance(item, FortranBase):<EOL><INDENT>item.markdown(md, project)<EOL><DEDENT><DEDENT>if hasattr(self,'<STR_LIT>'):<EOL><INDENT>if self.retvar:<EOL><INDENT>if isinstance(self.retvar, FortranBase):<EOL><INDENT>self.retvar.markdown(md, project)<EOL><DEDENT><DEDENT><DEDENT>if hasattr(self,'<STR_LIT>'):<EOL><INDENT>if isinstance(self.procedure, FortranBase):<EOL><INDENT>self.procedure.markdown(md, project)<EOL><DEDENT><DEDENT>return<EOL>
Process the documentation with Markdown to produce HTML.