mdx-formatter
GitHub リポジトリ

検索したい単語を入力

いつでも検索バーを開ける

これは旧バージョンのドキュメントです。最新バージョンを見る

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