'Implement highlight specific for Fortran.'

def highlight_block(self, text):

    text = to_text_string(text)
    self.setFormat(0, len(text), self.formats['normal'])
    match = self.PROG.search(text)
    index = 0
    while match:
        for (key, value) in list(match.groupdict().items()):
            if value:
                (start, end) = match.span(key)
                index += (end - start)
                self.setFormat(start, (end - start), self.formats[key])
                if (value.lower() in ('subroutine', 'module', 'function')):
                    match1 = self.IDPROG.match(text, end)
                    if match1:
                        (start1, end1) = match1.span(1)
                        self.setFormat(start1, (end1 - start1), self.formats['definition'])
        match = self.PROG.search(text, match.end())
    self.highlight_spaces(text)
