'Values like
name: koen
age: 29
will be converted in a dict: {\'name\': \'koen\', \'age\': \'29\'}
Also: Blocks between --- and ... will be converted into a YAML objects'

def parse_context(self, data, splitChar=':'):

    if (not self.is_html()):
        return ({}, data)
    lines = data.splitlines()
    if (not lines):
        return ({}, '')
    values = {}
    parsing_yaml = False
    for (i, line) in enumerate(lines):
        if ('---' in line):
            parsing_yaml = True
            break
        elif (not line):
            continue
        elif (splitChar in line):
            line = line.split(splitChar)
            values[line[0].strip()] = splitChar.join(line[1:]).strip()
        else:
            break
    if parsing_yaml:
        [raw_yaml, template] = data.split('...', 1)
        try:
            return (yaml.load(raw_yaml), template)
        except Exception as e:
            return ({}, template)
    else:
        return (values, '\n'.join(lines[i:]))
