diff --git a/test/doctool/test-doctool-html.js b/test/doctool/test-doctool-html.js
index afd89489f1..7aa8841451 100644
--- a/test/doctool/test-doctool-html.js
+++ b/test/doctool/test-doctool-html.js
@@ -27,6 +27,26 @@ const testData = [
'Reference/Global_Objects/Array" class="type"><Array>' +
''
},
+ {
+ 'file': common.fixturesDir + '/doc_with_yaml.md',
+ 'html': '
Sample Markdown with YAML info' +
+ '#
' +
+ 'Foobar#
' +
+ 'Added: v1.0.0
' +
+ 'Describe Foobar
in more detail here.
' +
+ 'Deprecated thingy#' +
+ '
' +
+ 'Added: v1.0.0
Describe ' +
+ 'Deprecated thingy
in more detail here.
' +
+ 'Something#
' +
+ ' ' +
+ 'Describe Something
in more detail here. ' +
+ '
'
+ },
];
testData.forEach(function(item) {
diff --git a/test/doctool/test-doctool-json.js b/test/doctool/test-doctool-json.js
index 31e260fcb0..ed7eb64a0e 100644
--- a/test/doctool/test-doctool-json.js
+++ b/test/doctool/test-doctool-json.js
@@ -64,6 +64,53 @@ var testData = [
'displayName': 'Title'
} ]
}
+ },
+ {
+ 'file': common.fixturesDir + '/doc_with_yaml.md',
+ 'json': {
+ 'source': 'foo',
+ 'modules': [
+ {
+ 'textRaw': 'Sample Markdown with YAML info',
+ 'name': 'sample_markdown_with_yaml_info',
+ 'modules': [
+ {
+ 'textRaw': 'Foobar',
+ 'name': 'foobar',
+ 'meta': {
+ 'added': 'v1.0.0'
+ },
+ 'desc': 'Describe Foobar
in more detail ' +
+ 'here.\n\n
\n',
+ 'type': 'module',
+ 'displayName': 'Foobar'
+ },
+ {
+ 'textRaw': 'Deprecated thingy',
+ 'name': 'deprecated_thingy',
+ 'meta': {
+ 'added': 'v1.0.0',
+ 'deprecated': 'v2.0.0'
+ },
+ 'desc': 'Describe Deprecated thingy
in more ' +
+ 'detail here.\n\n
\n',
+ 'type': 'module',
+ 'displayName': 'Deprecated thingy'
+ },
+ {
+ 'textRaw': 'Something',
+ 'name': 'something',
+ 'desc': '\n\n' +
+ 'Describe Something
in more detail here.\n
\n',
+ 'type': 'module',
+ 'displayName': 'Something'
+ }
+ ],
+ 'type': 'module',
+ 'displayName': 'Sample Markdown with YAML info'
+ }
+ ]
+ }
}
];
diff --git a/test/fixtures/doc_with_yaml.md b/test/fixtures/doc_with_yaml.md
new file mode 100644
index 0000000000..03411d5bf7
--- /dev/null
+++ b/test/fixtures/doc_with_yaml.md
@@ -0,0 +1,21 @@
+# Sample Markdown with YAML info
+
+## Foobar
+
+
+Describe `Foobar` in more detail here.
+
+## Deprecated thingy
+
+
+Describe `Deprecated thingy` in more detail here.
+
+## Something
+
+
+Describe `Something` in more detail here.