def formatHeadOfLine(text, pos, context):
    context['formattedText'] = context['formattedText'] + \
        SyntaxEngine.generateIndent(context['indentLevel'])
    context['isHeadOfLine'] = False

    pattern = re.compile(r"[ \t]*")
    match = pattern.match(text, pos)
    return match.end()
def formatChar0EIi0E(text, pos, context):
    context['formattedText'] = SyntaxEngine.trimSpaceReturnFromTail(context['formattedText']) \
        + '\n' \
        + SyntaxEngine.generateIndent(context['indentLevel']) \
        + text[pos] \
        + '\n'
    context['isHeadOfLine'] = True

    pattern = re.compile(r".\s*", re.DOTALL)
    match = pattern.match(text, pos)
    return match.end()