From 5606f0b1f2b55fe1be3e47555ba9c637ac660a6f Mon Sep 17 00:00:00 2001
From: Sam Ruby fish Redfish Describe fish Redfish item1 text
'
+ html: '
' +
+ '
'
},
{
file: fixtures.path('order_of_end_tags_5873.md'),
@@ -31,7 +31,7 @@ const testData = [
'id="foo_class_method_buffer_from_array"># ' +
'
'
+ 'Reference/Global_Objects/Array" class="type"><Array>'
},
{
file: fixtures.path('doc_with_yaml.md'),
@@ -45,11 +45,11 @@ const testData = [
'array
<Array>Foobar II#
' +
'Foobar II
in more detail here.' +
'fg(1)' +
'
Deprecated thingy
' +
+ '
',
analyticsId: 'UA-67020396-1'
},
];
diff --git a/tools/doc/html.js b/tools/doc/html.js
index 0f3293dadd51d1..8aaced7424e7fe 100644
--- a/tools/doc/html.js
+++ b/tools/doc/html.js
@@ -23,26 +23,39 @@
const common = require('./common.js');
const fs = require('fs');
-const marked = require('marked');
+const unified = require('unified');
+const find = require('unist-util-find');
+const visit = require('unist-util-visit');
+const markdown = require('remark-parse');
+const remark2rehype = require('remark-rehype');
+const raw = require('rehype-raw');
+const html = require('rehype-stringify');
const path = require('path');
const typeParser = require('./type-parser.js');
module.exports = toHTML;
-// Make `marked` to not automatically insert id attributes in headings.
-const renderer = new marked.Renderer();
-renderer.heading = (text, level) => `
-
-
-
-
item1
-text
--world
--world
-
item1
- -text
item1
-text
--world
--world
-
-world
world
code>var a = 1;
<div>hello</div>
- -<span>hello</span>
-``` - -``` bash -$ marked -hello -
-``` - -- - - - -See: https://github.com/evilstreak/markdown-js/issues/27 - -``` bash -$ markdown.js -[![an image](/image)](/link) -^D - -``` - -``` bash -$ marked -[![an image](/image)](/link) -^D - -``` - -- - - - -See: https://github.com/evilstreak/markdown-js/issues/24 - -``` bash -$ markdown.js -> a - -> b - -> c -^D --``` - -``` bash -$ marked -> a - -> b - -> c -^D -a
bundefined> c
-a - -
-b - -
-``` - -- - - - -``` bash -$ markdown.pl -* hello - * world - how - - are - you - - * today -* hi -^D -c -
hello
- -are -you
- -hello
-world -how
-are -you
-today
-