summaryrefslogtreecommitdiff
path: root/doc/api_assets
diff options
context:
space:
mode:
authorSam Ruby <rubys@intertwingly.net>2018-08-19 14:03:21 -0400
committerSam Ruby <rubys@intertwingly.net>2018-08-29 22:20:46 -0400
commit60465700ed055640e737ca3a53e16465dfec00d6 (patch)
treee5485fd7f1ab26b7fd0eee1aeb2fb98b098a59a1 /doc/api_assets
parent8569f4a4178d1a114a95aabcb27cb30cb265e621 (diff)
downloadandroid-node-v8-60465700ed055640e737ca3a53e16465dfec00d6.tar.gz
android-node-v8-60465700ed055640e737ca3a53e16465dfec00d6.tar.bz2
android-node-v8-60465700ed055640e737ca3a53e16465dfec00d6.zip
tools: Include links to source code in documentation
Parse source code using acorn; extracting exports. When producing documentation, match exports to headers. When a match is found, add a [src] link. This first commit handles simple exported classes and functions, and does so without requiring any changes to the source code or markdown. Subsequent commits will attempt to match more headers, and some of these changes are likely to require changes to the source code and/or markdown. PR-URL: https://github.com/nodejs/node/pull/22405 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Diffstat (limited to 'doc/api_assets')
-rw-r--r--doc/api_assets/style.css5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/api_assets/style.css b/doc/api_assets/style.css
index f59f377004..7d65b7405b 100644
--- a/doc/api_assets/style.css
+++ b/doc/api_assets/style.css
@@ -283,6 +283,11 @@ h2, h3, h4, h5 {
padding-right: 40px;
}
+.srclink {
+ float: right;
+ font-size: smaller;
+}
+
h1 span, h2 span, h3 span, h4 span {
position: absolute;
display: block;