@@ -13,31 +13,31 @@ var html = require('rehype-parse')
13
13
var stringify = require ( 'remark-stringify' )
14
14
var assert = require ( 'mdast-util-assert' )
15
15
var remove = require ( 'unist-util-remove-position' )
16
- var toMDAST = require ( '..' )
16
+ var toMdast = require ( '..' )
17
17
18
18
var fixtures = path . join ( __dirname , 'fixtures' )
19
19
20
20
test ( 'core' , function ( t ) {
21
21
t . deepEqual (
22
- toMDAST ( u ( 'root' , [ h ( 'strong' , 'Alpha' ) ] ) ) ,
22
+ toMdast ( u ( 'root' , [ h ( 'strong' , 'Alpha' ) ] ) ) ,
23
23
u ( 'root' , [ u ( 'strong' , [ u ( 'text' , 'Alpha' ) ] ) ] ) ,
24
- 'should transform HAST to MDAST '
24
+ 'should transform hast to mdast '
25
25
)
26
26
27
27
t . deepEqual (
28
- toMDAST ( u ( 'root' , [ u ( 'unknown' , 'text' ) ] ) ) ,
28
+ toMdast ( u ( 'root' , [ u ( 'unknown' , 'text' ) ] ) ) ,
29
29
u ( 'root' , [ u ( 'text' , 'text' ) ] ) ,
30
30
'should transform unknown texts to `text`'
31
31
)
32
32
33
33
t . deepEqual (
34
- toMDAST ( u ( 'root' , [ u ( 'unknown' , [ h ( 'em' ) ] ) ] ) ) ,
34
+ toMdast ( u ( 'root' , [ u ( 'unknown' , [ h ( 'em' ) ] ) ] ) ) ,
35
35
u ( 'root' , [ u ( 'emphasis' , [ ] ) ] ) ,
36
36
'should unwrap unknown parents'
37
37
)
38
38
39
39
t . deepEqual (
40
- toMDAST ( u ( 'root' , [ u ( 'unknown' ) ] ) ) ,
40
+ toMdast ( u ( 'root' , [ u ( 'unknown' ) ] ) ) ,
41
41
u ( 'root' , [ ] ) ,
42
42
'should ignore unknown voids'
43
43
)
@@ -48,7 +48,7 @@ test('core', function(t) {
48
48
}
49
49
50
50
t . deepEqual (
51
- toMDAST ( {
51
+ toMdast ( {
52
52
type : 'root' ,
53
53
children : [
54
54
{
@@ -116,7 +116,7 @@ test('fixtures', function(t) {
116
116
. use ( function ( ) {
117
117
return transformer
118
118
function transformer ( tree ) {
119
- return toMDAST ( tree , config )
119
+ return toMdast ( tree , config )
120
120
}
121
121
} )
122
122
. use ( stringify )
@@ -128,7 +128,7 @@ test('fixtures', function(t) {
128
128
129
129
st . doesNotThrow ( function ( ) {
130
130
assert ( tree )
131
- } , 'should produce valid MDAST nodes' )
131
+ } , 'should produce valid mdast nodes' )
132
132
133
133
if ( ignore ) {
134
134
st . end ( )
@@ -168,7 +168,7 @@ test('handlers option', function(t) {
168
168
}
169
169
170
170
t . deepEqual (
171
- toMDAST (
171
+ toMdast (
172
172
{
173
173
type : 'root' ,
174
174
children : [
@@ -216,7 +216,7 @@ test('document option', function(t) {
216
216
] )
217
217
218
218
t . deepEqual (
219
- toMDAST ( tree ) ,
219
+ toMdast ( tree ) ,
220
220
u ( 'root' , [
221
221
u ( 'strong' , [ u ( 'text' , 'Importance' ) ] ) ,
222
222
u ( 'text' , ' and ' ) ,
@@ -227,7 +227,7 @@ test('document option', function(t) {
227
227
)
228
228
229
229
t . deepEqual (
230
- toMDAST ( tree , { document : true } ) ,
230
+ toMdast ( tree , { document : true } ) ,
231
231
u ( 'root' , [
232
232
u ( 'paragraph' , [
233
233
u ( 'strong' , [ u ( 'text' , 'Importance' ) ] ) ,
@@ -244,7 +244,7 @@ test('document option', function(t) {
244
244
245
245
test ( 'newlines option' , function ( t ) {
246
246
t . deepEqual (
247
- toMDAST ( {
247
+ toMdast ( {
248
248
type : 'root' ,
249
249
children : [
250
250
{
@@ -278,7 +278,7 @@ test('newlines option', function(t) {
278
278
)
279
279
280
280
t . deepEqual (
281
- toMDAST (
281
+ toMdast (
282
282
{
283
283
type : 'root' ,
284
284
children : [
0 commit comments