prettier / prettier/vim-prettier

Markdown Formatting removes folded text at the end of the file when it removes empty lines

Open
#294 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vim Script
Stars
1.8k
Forks
137
PR merge metrics
No merged PRs in 30d

Description

BUG

This seams to only happen when in a heading level higher than the fold level in my case 2, The only other markdown plugin I have is plasticboy/vim-markdown which is responsible for the folding.

This issue does not exist for :PrettierCli. Therefor I am unsure if this is a vim-prettier or a vim-markdown issue.

Expected behavior

### test

Some Text


should result in

### test

Some Text

but produces

### test

PrettierVersion: 1.0.0-beta
PrettierCliVersion: 2.0.4
NVIM: 0.5.0-dev+1233-g82ac44d01

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in vim-prettier with the provided Markdown sample and the plasticboy/vim-markdown folding plugin. Compare the normal formatting path with :PrettierCli and determine whether the folded text disappears in vim-prettier or vim-markdown. Done means removing the extra trailing empty line while preserving “Some Text”.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.