private static void insertLastNewLines(@NotNull PsiFile psiFile, int num) {
    assert num >= 0: "Cannot insert negative number of new lines";

    PsiElement newLines = MarkdownPsiElementFactory.createNewLines(psiFile.getProject(), num);
    psiFile.addRange(newLines.getFirstChild(), newLines.getLastChild());
  }
private static void insertLastNewLines(@NotNull PsiFile psiFile, int num)