File tree 3 files changed +88
-0
lines changed
3 files changed +88
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,26 @@ const testData = [
27
27
'Reference/Global_Objects/Array" class="type"><Array></a></li>' +
28
28
'</ul></div>'
29
29
} ,
30
+ {
31
+ 'file' : common . fixturesDir + '/doc_with_yaml.md' ,
32
+ 'html' : '<h1>Sample Markdown with YAML info' +
33
+ '<span><a class="mark" href="#foo_sample_markdown_with_yaml_info" ' +
34
+ ' id="foo_sample_markdown_with_yaml_info">#</a></span></h1>' +
35
+ '<h2>Foobar<span><a class="mark" href="#foo_foobar" ' +
36
+ 'id="foo_foobar">#</a></span></h2>' +
37
+ '<div class="api_metadata"><span>Added: v1.0.0</span></div> ' +
38
+ '<p>Describe <code>Foobar</code> in more detail here.</p>' +
39
+ '<h2>Deprecated thingy<span><a class="mark" ' +
40
+ 'href="#foo_deprecated_thingy" id="foo_deprecated_thingy">#</a>' +
41
+ '</span></h2>' +
42
+ '<div class="api_metadata"><span>Added: v1.0.0</span></div><p>Describe ' +
43
+ '<code>Deprecated thingy</code> in more detail here.</p>' +
44
+ '<h2>Something<span><a class="mark" href="#foo_something" ' +
45
+ 'id="foo_something">#</a></span></h2> ' +
46
+ '<!-- This is not a metadata comment --> ' +
47
+ '<p>Describe <code>Something</code> in more detail here. ' +
48
+ '</p>'
49
+ } ,
30
50
] ;
31
51
32
52
testData . forEach ( function ( item ) {
Original file line number Diff line number Diff line change @@ -64,6 +64,53 @@ var testData = [
64
64
'displayName' : 'Title'
65
65
} ]
66
66
}
67
+ } ,
68
+ {
69
+ 'file' : common . fixturesDir + '/doc_with_yaml.md' ,
70
+ 'json' : {
71
+ 'source' : 'foo' ,
72
+ 'modules' : [
73
+ {
74
+ 'textRaw' : 'Sample Markdown with YAML info' ,
75
+ 'name' : 'sample_markdown_with_yaml_info' ,
76
+ 'modules' : [
77
+ {
78
+ 'textRaw' : 'Foobar' ,
79
+ 'name' : 'foobar' ,
80
+ 'meta' : {
81
+ 'added' : 'v1.0.0'
82
+ } ,
83
+ 'desc' : '<p>Describe <code>Foobar</code> in more detail ' +
84
+ 'here.\n\n</p>\n' ,
85
+ 'type' : 'module' ,
86
+ 'displayName' : 'Foobar'
87
+ } ,
88
+ {
89
+ 'textRaw' : 'Deprecated thingy' ,
90
+ 'name' : 'deprecated_thingy' ,
91
+ 'meta' : {
92
+ 'added' : 'v1.0.0' ,
93
+ 'deprecated' : 'v2.0.0'
94
+ } ,
95
+ 'desc' : '<p>Describe <code>Deprecated thingy</code> in more ' +
96
+ 'detail here.\n\n</p>\n' ,
97
+ 'type' : 'module' ,
98
+ 'displayName' : 'Deprecated thingy'
99
+ } ,
100
+ {
101
+ 'textRaw' : 'Something' ,
102
+ 'name' : 'something' ,
103
+ 'desc' : '<!-- This is not a metadata comment -->\n\n<p>' +
104
+ 'Describe <code>Something</code> in more detail here.\n</p>\n' ,
105
+ 'type' : 'module' ,
106
+ 'displayName' : 'Something'
107
+ }
108
+ ] ,
109
+ 'type' : 'module' ,
110
+ 'displayName' : 'Sample Markdown with YAML info'
111
+ }
112
+ ]
113
+ }
67
114
}
68
115
] ;
69
116
Original file line number Diff line number Diff line change
1
+ # Sample Markdown with YAML info
2
+
3
+ ## Foobar
4
+ <!-- YAML
5
+ added: v1.0.0
6
+ -->
7
+
8
+ Describe ` Foobar ` in more detail here.
9
+
10
+ ## Deprecated thingy
11
+ <!-- YAML
12
+ added: v1.0.0
13
+ deprecated: v2.0.0
14
+ -->
15
+
16
+ Describe ` Deprecated thingy ` in more detail here.
17
+
18
+ ## Something
19
+ <!-- This is not a metadata comment -->
20
+
21
+ Describe ` Something ` in more detail here.
You can’t perform that action at this time.
0 commit comments