mdx-formatter

Type to search...

to open search from anywhere

You are viewing documentation for an older version. View the latest version

addEmptyLineBetweenElements

Add empty lines between markdown block elements

Add a single empty line between markdown block elements (headings, paragraphs, lists, code blocks, JSX components, etc.).

Options

PropertyTypeDefaultDescription
enabledbooleantrueEnable/disable this rule

Config

{
  "addEmptyLineBetweenElements": {
    "enabled": true
  }
}

Examples

Headings and paragraphs

Before:

## Heading
Content here
Another paragraph

After:

## Heading

Content here

Another paragraph

JSX components and text

Before:

<ExImg src="/test.jpg" alt="test" />
Next paragraph

After:

<ExImg src="/test.jpg" alt="test" />

Next paragraph

Lists and code blocks

Before:

Some text
- Item 1
- Item 2
```js
const x = 1;
```
More text

After:

Some text

- Item 1
- Item 2

```js
const x = 1;
```

More text

Revision History