1- # mdast-util-position [ ![ Build Status] [ travis -badge]] [ travis ] [ ![ Coverage Status] [ coverage-badge ]] [ coverage ]
1+ # mdast-util-position [ ![ Build Status] [ build -badge]] [ build-status ] [ ![ Coverage Status] [ coverage-badge ]] [ coverage-status ] [ ![ Chat ] [ chat-badge ]] [ chat ]
22
3- [ ** mdast ** ] [ mdast ] utility to get the position of nodes.
3+ <!-- lint disable heading-increment no-duplicate-headings -->
44
5- * Supports index-based positional information patched by
6- [ ** mdast-range** ] [ mdast-range ] ;
5+ [ ** mdast** ] [ mdast ] utility to get the position of nodes.
76
7+ * Supports index-based positional information;
88* Supports [ ` indent ` ] [ mdast-indent ] .
99
10- Utility to get the style of an [ ** mdast** ] [ mdast ] heading.
11-
1210## Installation
1311
14- [ npm] [ npm-install ] :
12+ [ npm] [ ] :
1513
1614``` bash
1715npm install mdast-util-position
1816```
1917
20- ** mdast-util-position** is also available for [ duo] [ ] ,
21- and as an AMD, CommonJS, and globals module,
22- [ uncompressed and compressed] [ releases ] .
18+ ** mdast-util-position** is also available as an AMD, CommonJS, and
19+ globals module, [ uncompressed and compressed] [ releases ] .
2320
2421## Usage
2522
2623``` js
2724var remark = require (' remark' );
2825var position = require (' mdast-util-position' );
2926
30- var ast = remark .parse ([
27+ var ast = remark () .parse ([
3128 ' # foo' ,
3229 ' ' ,
3330 ' * bar' ,
@@ -49,57 +46,64 @@ position.generated() // true
4946
5047### ` position.end([node]) `
5148
52- Get the heading style of a node.
49+ Get the bound position of ` node ` .
5350
54- ** Parameters** :
51+ ###### Parameters
5552
56- * ` node ` ([ ` Node ` ] [ mdast- node] ) — Node to check;
53+ * ` node ` ([ ` Node? ` ] [ node ] ) — Node to check.
5754
58- ** Returns** ([ ` Position ` ] [ mdast-position ] ) — Filled with ` line `
59- (nullable ` uint32 >= 1 ` ) and ` column ` (nullable ` uint32 >= 1 ` ).
55+ ###### Returns
56+
57+ [ ` Position ` ] [ mdast-position ] — Filled with ` line ` (nullable
58+ ` uint32 >= 1 ` ), ` column ` (nullable ` uint32 >= 1 ` ), ` offset ` (nullable
59+ ` uint32 >= 0 ` ), and ` indent ` .
6060
6161### ` position.generated([node]) `
6262
6363Get the heading style of a node.
6464
65- ** Parameters** :
65+ ###### Parameters
6666
6767* ` node ` ([ ` Node ` ] [ mdast-node ] ) — Node to check;
6868
69- ** Returns** (` boolean ` ) — Whether or not ` node ` has positional
70- information (both starting and ending lines and columns). This is
71- useful when checking if a node is inserted by plug-ins.
69+ ###### Returns
70+
71+ ` boolean ` — Whether or not ` node ` has positional information (both
72+ starting and ending lines and columns). This is useful when checking
73+ if a node is inserted by plug-ins.
7274
7375## License
7476
75- [ MIT] [ license ] © [ Titus Wormer] [ home ]
77+ [ MIT] [ license ] © [ Titus Wormer] [ author ]
7678
7779<!-- Definitions -->
7880
79- [ travis -badge] : https://img.shields.io/travis/wooorm/mdast-util-position.svg
81+ [ build -badge] : https://img.shields.io/travis/wooorm/mdast-util-position.svg
8082
81- [ travis ] : https://travis-ci.org/wooorm/mdast-util-position
83+ [ build-status ] : https://travis-ci.org/wooorm/mdast-util-position
8284
8385[ coverage-badge ] : https://img.shields.io/codecov/c/github/wooorm/mdast-util-position.svg
8486
85- [ coverage ] : https://codecov.io/github/wooorm/mdast-util-position
87+ [ coverage-status ] : https://codecov.io/github/wooorm/mdast-util-position
8688
87- [ mdast ] : https://github.com/ wooorm/mdast
89+ [ chat-badge ] : https://img.shields.io/gitter/room/ wooorm/remark.svg
8890
89- [ mdast-node ] : https://github.com/wooorm/mdast#node
91+ [ chat ] : https://gitter.im/wooorm/remark
92+
93+ [ releases ] : https://github.com/wooorm/mdast-util-position/releases
9094
91- [ mdast-range ] : https://github.com/wooorm/mdast-range
95+ [ license ] : LICENSE
9296
93- [ mdast-indent ] : https ://github .com/wooorm/mdast#location
97+ [ author ] : http ://wooorm .com
9498
95- [ mdast-position ] : https://github. com/wooorm/mdast/blob/master/doc/nodes.md#position
99+ [ npm ] : https://docs.npmjs. com/cli/install
96100
97- [ npm-install ] : https://docs.npmjs. com/cli/install
101+ [ mdast ] : https://github. com/wooorm/mdast
98102
99- [ duo ] : http ://duojs.org/#getting-started
103+ [ node ] : https ://github.com/wooorm/mdast#node
100104
101- [ releases ] : https://github.com/wooorm/mdast-util-position/releases
105+ [ mdast-node ] : https://github.com/wooorm/mdast#node
102106
103- [ license ] : LICENSE
107+ [ mdast-indent ] : https://github.com/wooorm/mdast#location
104108
105- [ home ] : http ://wooorm .com
109+ [ mdast-position ] : https ://github .com/wooorm/mdast/blob/master/doc/nodes.md#position
0 commit comments