function fixIndentation()

in src/util/yamlCompletionUtils.ts [95:106]


function fixIndentation(text: string): string {
    // tries to fix an issue when yaml-language-service isn't indentating subsequent lines when inserting an array item.
    return text
        ?.split("\n")
        .map((line, idx) => {
            if (idx > 0) {
                return "  " + line;
            }
            return line;
        })
        .join("\n");
}