Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6c81b75
deps: add example of comparing OpenSSL changes
danbev May 26, 2017
d319015
deps: upgrade openssl sources to 1.0.2l
danbev May 26, 2017
b0b52bc
deps: copy all openssl header files to include dir
danbev May 26, 2017
22d74c4
deps: fix openssl assembly error on ia32 win32
indutny Jan 8, 2014
32bbf7a
deps: fix asm build error of openssl in x86_win32
Feb 13, 2015
b7a80dd
openssl: fix keypress requirement in apps on win32
Feb 17, 2015
f90919f
deps: add -no_rand_screen to openssl s_client
May 27, 2015
02a04cf
deps: update openssl config files
danbev May 26, 2017
99cadcb
deps: update openssl asm and asm_obsolete files
danbev Jun 1, 2017
e510003
doc: add missing make command to UPGRADING.md
danbev May 30, 2017
6602954
doc: consistent case for primitive types
silverwind Feb 4, 2017
40babf1
doc: linkify type[] syntax, support lowercase for primitives
silverwind Feb 14, 2017
e70cb6a
tools: fix lint issue in doctool
silverwind Mar 2, 2017
311ef42
doc/tools: fix more type inconsistencies
silverwind Mar 5, 2017
ae20511
test: enable setuid/setgid test
Trott Apr 13, 2017
4848862
test: introduce `common.crashOnUnhandledRejection`
addaleax Apr 19, 2017
dfcefd6
test,doc: document `crashOnUnhandledRejection()`
addaleax Apr 27, 2017
321c90f
zlib: fix node crashing on invalid options
aqrln May 22, 2017
04fb72f
crypto: clear err stack after ECDH::BufferToPoint
rfk May 29, 2017
11c7e01
v8: fix build errors with g++ 7
Jun 9, 2017
099694f
test: move test-debug-brk to sequential
gibfahn Jun 9, 2017
7a22964
test: move common.PORT debug tests to sequential
gibfahn Jun 10, 2017
a1b8996
child_process: fix deoptimizing use of arguments
vsemozhetbyt Feb 19, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: linkify type[] syntax, support lowercase for primitives
PR-URL: #11167
Backport-PR-URL: #13054
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
  • Loading branch information
silverwind authored and gibfahn committed Jun 17, 2017
commit 40babf1f19973ae0b2693f600589eb165072178f
27 changes: 18 additions & 9 deletions tools/doc/type-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ const jsDocUrl = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/' +
const jsPrimitiveUrl = 'https://developer.mozilla.org/en-US/docs/Web/' +
'JavaScript/Data_structures';
const jsPrimitives = {
'Integer': 'Number', // this is for extending
'Number': 'Number',
'String': 'String',
'Boolean': 'Boolean',
'Null': 'Null',
'Symbol': 'Symbol'
'integer': 'Number', // this is for extending
'number': 'Number',
'string': 'String',
'boolean': 'Boolean',
'null': 'Null',
'symbol': 'Symbol'
};
const jsGlobalTypes = [
'Error', 'Object', 'Function', 'Array', 'TypedArray', 'Uint8Array',
Expand Down Expand Up @@ -49,7 +49,16 @@ module.exports = {
typeText = typeText.trim();
if (typeText) {
let typeUrl = null;
const primitive = jsPrimitives[typeText];

// To support type[], we store the full string and use
// the bracket-less version to lookup the type URL
const typeTextFull = typeText;
if (/\[]$/.test(typeText)) {
typeText = typeText.slice(0, -2);
}

const primitive = jsPrimitives[typeText.toLowerCase()];

if (primitive !== undefined) {
typeUrl = `${jsPrimitiveUrl}#${primitive}_type`;
} else if (jsGlobalTypes.indexOf(typeText) !== -1) {
Expand All @@ -60,9 +69,9 @@ module.exports = {

if (typeUrl) {
typeLinks.push('<a href="' + typeUrl + '" class="type">&lt;' +
typeText + '&gt;</a>');
typeTextFull + '&gt;</a>');
} else {
typeLinks.push('<span class="type">&lt;' + typeText + '&gt;</span>');
typeLinks.push('<span class="type">&lt;' + typeTextFull + '&gt;</span>');
}
}
});
Expand Down