<commit_before>[![npm](https://nodei.co/npm/mdast-util-normalize-headings.png)](https://npmjs.com/package/mdast-util-normalize-headings)

# mdast-util-normalize-headings

[![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]

Make sure there is no more than a single top-level heading in the document.

[travis]: https://travis-ci.org/eush77/mdast-util-normalize-headings
[travis-badge]: https://travis-ci.org/eush77/mdast-util-normalize-headings.svg
[david]: https://david-dm.org/eush77/mdast-util-normalize-headings
[david-badge]: https://david-dm.org/eush77/mdast-util-normalize-headings.png

## Install

```
npm install mdast-util-normalize-headings
```

## License

MIT
<commit_msg>Add more detailed description<commit_after>[![npm](https://nodei.co/npm/mdast-util-normalize-headings.png)](https://npmjs.com/package/mdast-util-normalize-headings)

# mdast-util-normalize-headings

[![Build Status][travis-badge]][travis] [![Dependency Status][david-badge]][david]

Providing multiple top-level headings per single Markdown document is confusing for tools that assume that there is only a single top-level heading that contains some meta-information (usually title) about the document.

This util makes sure that there is no more than a single top-level heading in the document by shifting all headings one level deeper if needed.

Originally extracted from [`mdast-man`][mdast-man] plugin.

[mdast-man]: https://github.com/woorm/mdast-man

[travis]: https://travis-ci.org/eush77/mdast-util-normalize-headings
[travis-badge]: https://travis-ci.org/eush77/mdast-util-normalize-headings.svg
[david]: https://david-dm.org/eush77/mdast-util-normalize-headings
[david-badge]: https://david-dm.org/eush77/mdast-util-normalize-headings.png

## Install

```
npm install mdast-util-normalize-headings
```

## License

MIT

{'fraction_non_alphanumeric': 0.15059588299024917, 'fraction_numerical': 0.00866738894907909, 'mean_word_length': 5.177257525083612, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 13, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5116396', 'n_tokens_mistral': 668, 'n_tokens_neox': 651, 'n_words': 121}