summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2016-08-29 20:15:45 -0700
committerRoman Reiss <me@silverwind.io>2016-09-16 17:29:05 +0200
commita7fa72156a05c0defa9e6f8c6aca7fbd7ff9ab78 (patch)
tree8edcbfbc797105ff5ebe8b61eb318340b0c65da4 /tools
parent39fbb5adf54f2d4e700b92abc70516ebc09b8fd7 (diff)
downloadandroid-node-v8-a7fa72156a05c0defa9e6f8c6aca7fbd7ff9ab78.tar.gz
android-node-v8-a7fa72156a05c0defa9e6f8c6aca7fbd7ff9ab78.tar.bz2
android-node-v8-a7fa72156a05c0defa9e6f8c6aca7fbd7ff9ab78.zip
doc/json: make sure links are correctly passed to marked
Previously, an attempt was made to make sure the links state is inherited. Unfortunately, this support was not complete, which results in various unresolved links in the JSON output (as an example, [1] contains `initialized by calling [<code>buf.fill(fill, encoding)</code>][<code>buf.fill()</code>]`). This commit completes that attempt. After this commit, individual instances of the parser (for descriptions) inherit the links state from the root lexer, so that individual Markdown links in descriptions could be resolved. That same example is now substituted with `initialized by calling <a href=\"#buffer_buf_fill_value_offset_end_encoding\"><code>buf.fill(fill, encoding)</code></a>`. [1]: https://nodejs.org/api/buffer.json PR-URL: https://github.com/nodejs/node/pull/8494 Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/doc/json.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/doc/json.js b/tools/doc/json.js
index f5bce30105..a194c7f723 100644
--- a/tools/doc/json.js
+++ b/tools/doc/json.js
@@ -109,6 +109,7 @@ function doJSON(input, filename, cb) {
current.shortDesc = current.desc;
current.desc = [];
}
+ current.desc.links = lexed.links;
current.desc.push(tok);
state = 'DESC';
}
@@ -144,6 +145,7 @@ function doJSON(input, filename, cb) {
}
current.desc = current.desc || [];
+ current.desc.links = lexed.links;
current.desc.push(tok);
});