import re


def normalize(string):
    """Normalize text to yaml format standards."""
    lines = string.strip().split('\n')
    if 'skills' in lines[0] or \
            'connectors' in lines[0] or \
            'databases' in lines[0] or \
            'parsers' in lines[0]:
        return '\n'.join([
            re.sub('^(#)?  ', '\g<1>', line)
            for line in lines[1:]
        ])
    return string.strip()