Skip to content

New blank lines are added to code block in Markdown files when saving the file #624

@paolovanini

Description

@paolovanini

When I save a Markdown file containing code blocks to highlight the syntax, some new blank lines are added to that code block.

For example, in a markdown file called "test.md", I inserted the following text with the triple back-tick and the "powershell" as language type:
```powershell
dir
```

After I saved the file, I found an extra line after the "dir" code like this:
```powershell
dir

```

If a keep saving the file, another new blank line is added:
```powershell
dir


```

For a code block containing 5 lines of "typescript" code, with just 1 save, hundreds of new lines were added between each line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lockedLocked due to inactivityneed-more-infoFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions