Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 13, 2016
1 parent 6ec2b65 commit ef7d8af
Showing 1 changed file with 36 additions and 18 deletions.
54 changes: 36 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# mdast-util-heading-style [![Build Status][travis-badge]][travis] [![Coverage Status][coverage-badge]][coverage]
# mdast-util-heading-style [![Build Status][build-badge]][build-status] [![Coverage Status][coverage-badge]][coverage-status] [![Chat][chat-badge]][chat]

Utility to get the style of an [**mdast**][mdast] heading.
<!--lint disable list-item-spacing heading-increment list-item-indent-->

Get the style of an [**MDAST**][mdast] heading.

## Installation

[npm][npm-install]:
[npm][]:

```bash
npm install mdast-util-heading-style
Expand Down Expand Up @@ -33,39 +35,55 @@ style(remark.parse('### ATX').children[0], 'setext'); // 'setext'

Get the heading style of a node.

**Parameters**:

* `node` ([`Node`][mdast-node]);
###### Parameters

* `node` ([`Node`][node]) — Node to parse;
* `relative` (`string`, optional) — Style to use for ambiguous headings
(atx-headings with a level of three or more could also be setext).

**Returns**: `string` (`'atx'`, `'atx-closed'`, or `'setext'`)
— When an ambiguous heading is found, either `relative` or `null` is
returned.
###### Returns

`string` (`'atx'`, `'atx-closed'`, or `'setext'`) — When an ambiguous
heading is found, either `relative` or `null` is returned.

### `Marker`

A comment marker.

###### Properties

* `name` (`string`) — Name of marker;
* `attributes` (`string`) — Value after name;
* `parameters` (`Object`) — Parsed attributes, tries to convert
values to numbers and booleans when possible;
* `node` ([`Node`][node]) — Reference to given node.

## License

[MIT][license] © [Titus Wormer][home]
[MIT][license] © [Titus Wormer][author]

<!-- Definitions -->

[travis-badge]: https://img.shields.io/travis/wooorm/mdast-util-heading-style.svg
[build-badge]: https://img.shields.io/travis/wooorm/mdast-util-heading-style.svg

[travis]: https://travis-ci.org/wooorm/mdast-util-heading-style
[build-status]: https://travis-ci.org/wooorm/mdast-util-heading-style

[coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/mdast-util-heading-style.svg

[coverage]: https://codecov.io/github/wooorm/mdast-util-heading-style
[coverage-status]: https://codecov.io/github/wooorm/mdast-util-heading-style

[mdast]: https://github.com/wooorm/mdast

[mdast-node]: https://github.com/wooorm/mdast#node
[chat-badge]: https://img.shields.io/gitter/room/wooorm/remark.svg

[npm-install]: https://docs.npmjs.com/cli/install
[chat]: https://gitter.im/wooorm/remark

[releases]: https://github.com/wooorm/mdast-util-heading-style/releases

[license]: LICENSE

[home]: http://wooorm.com
[author]: http://wooorm.com

[npm]: https://docs.npmjs.com/cli/install

[mdast]: https://github.com/wooorm/mdast

[node]: https://github.com/wooorm/mdast#node

0 comments on commit ef7d8af

Please sign in to comment.