|
@ -11,6 +11,7 @@ try { |
|
|
const assert = require('assert'); |
|
|
const assert = require('assert'); |
|
|
const fs = require('fs'); |
|
|
const fs = require('fs'); |
|
|
const path = require('path'); |
|
|
const path = require('path'); |
|
|
|
|
|
const fixtures = require('../common/fixtures'); |
|
|
const processIncludes = require('../../tools/doc/preprocess.js'); |
|
|
const processIncludes = require('../../tools/doc/preprocess.js'); |
|
|
const html = require('../../tools/doc/html.js'); |
|
|
const html = require('../../tools/doc/html.js'); |
|
|
|
|
|
|
|
@ -21,12 +22,12 @@ const html = require('../../tools/doc/html.js'); |
|
|
// have an html parser.
|
|
|
// have an html parser.
|
|
|
const testData = [ |
|
|
const testData = [ |
|
|
{ |
|
|
{ |
|
|
file: path.join(common.fixturesDir, 'sample_document.md'), |
|
|
file: fixtures.path('sample_document.md'), |
|
|
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' + |
|
|
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' + |
|
|
'<li>Bluefish</li></ol>' |
|
|
'<li>Bluefish</li></ol>' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
file: path.join(common.fixturesDir, 'order_of_end_tags_5873.md'), |
|
|
file: fixtures.path('order_of_end_tags_5873.md'), |
|
|
html: '<h3>ClassMethod: Buffer.from(array) <span> ' + |
|
|
html: '<h3>ClassMethod: Buffer.from(array) <span> ' + |
|
|
'<a class="mark" href="#foo_class_method_buffer_from_array" ' + |
|
|
'<a class="mark" href="#foo_class_method_buffer_from_array" ' + |
|
|
'id="foo_class_method_buffer_from_array">#</a> </span> </h3><div' + |
|
|
'id="foo_class_method_buffer_from_array">#</a> </span> </h3><div' + |
|
@ -36,7 +37,7 @@ const testData = [ |
|
|
'</ul></div>' |
|
|
'</ul></div>' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
file: path.join(common.fixturesDir, 'doc_with_yaml.md'), |
|
|
file: fixtures.path('doc_with_yaml.md'), |
|
|
html: '<h1>Sample Markdown with YAML info' + |
|
|
html: '<h1>Sample Markdown with YAML info' + |
|
|
'<span><a class="mark" href="#foo_sample_markdown_with_yaml_info" ' + |
|
|
'<span><a class="mark" href="#foo_sample_markdown_with_yaml_info" ' + |
|
|
' id="foo_sample_markdown_with_yaml_info">#</a></span></h1>' + |
|
|
' id="foo_sample_markdown_with_yaml_info">#</a></span></h1>' + |
|
@ -72,7 +73,7 @@ const testData = [ |
|
|
'</p>' |
|
|
'</p>' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
file: path.join(common.fixturesDir, 'doc_with_includes.md'), |
|
|
file: fixtures.path('doc_with_includes.md'), |
|
|
html: '<!-- [start-include:doc_inc_1.md] -->' + |
|
|
html: '<!-- [start-include:doc_inc_1.md] -->' + |
|
|
'<p>Look <a href="doc_inc_2.html#doc_inc_2_foobar">here</a>!</p>' + |
|
|
'<p>Look <a href="doc_inc_2.html#doc_inc_2_foobar">here</a>!</p>' + |
|
|
'<!-- [end-include:doc_inc_1.md] -->' + |
|
|
'<!-- [end-include:doc_inc_1.md] -->' + |
|
@ -83,7 +84,7 @@ const testData = [ |
|
|
'<!-- [end-include:doc_inc_2.md] -->' |
|
|
'<!-- [end-include:doc_inc_2.md] -->' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
file: path.join(common.fixturesDir, 'sample_document.md'), |
|
|
file: fixtures.path('sample_document.md'), |
|
|
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' + |
|
|
html: '<ol><li>fish</li><li><p>fish</p></li><li><p>Redfish</p></li>' + |
|
|
'<li>Bluefish</li></ol>', |
|
|
'<li>Bluefish</li></ol>', |
|
|
analyticsId: 'UA-67020396-1' |
|
|
analyticsId: 'UA-67020396-1' |
|
|