forked from nodejs/node
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc,tools: properly syntax highlight API ref docs
Prior to this commit, all <pre> tags were being highlighted as JavaScript. This has been corrected to syntax highlight all languages appearing in the API reference docs. This was accomplished by using highlight.js instead of SHJS for the frontend lib. * remove SHJS JavaScript code * add highlight.js bundle * fix script tags to reflect replacement * migrate CSS to use highlight.js classes * add appropriate documentation * ensure api_assets README.md stays interal Fixes: nodejs#33363 PR-URL: nodejs#33442 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
- Loading branch information
1 parent
9ad8b4d
commit dc6c93c
Showing
11 changed files
with
104 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# API Reference Document Assets | ||
|
||
## highlight.pack.js | ||
|
||
_Generated by [highlightjs.org/download][] on 2020-05-16._ | ||
|
||
Grammars included in the custom bundle: | ||
|
||
* Bash | ||
* C | ||
* C++ | ||
* CoffeeScript | ||
* JavaScript | ||
* JSON | ||
* Markdown | ||
* Plaintext | ||
* Shell Session | ||
|
||
## hljs.css | ||
|
||
The syntax theme for code snippets in API reference documents. | ||
|
||
## style.css | ||
|
||
The main stylesheet for API reference documents. | ||
|
||
[highlightjs.org/download]: https://highlightjs.org/download/ |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.hljs { | ||
font-weight: normal; | ||
font-style: normal; | ||
} | ||
|
||
.hljs-symbol { | ||
color: #333; | ||
} | ||
|
||
.hljs-keyword { | ||
color: #338; | ||
} | ||
|
||
.hljs-string, | ||
.hljs-regexp, | ||
.hljs-number { | ||
color: #E54305; | ||
} | ||
|
||
.hljs-doctag { | ||
color: #040404; | ||
} | ||
|
||
.hljs-doctag .hljs-type, | ||
.hljs-doctag .hljs-variable, | ||
.hljs-comment { | ||
color: #666; | ||
font-weight: lighter; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.