-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
doc,tools: properly syntax highlight API ref docs #33442
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
DerekNonGeneric
wants to merge
5
commits into
nodejs:master
from
DerekNonGeneric:fix/api-ref-docs-syntax
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0bc8b9a
doc,tools: properly syntax highlight API ref docs
DerekNonGeneric f1cc215
fixup! doc,tools: properly syntax highlight API ref docs
DerekNonGeneric cb83a96
fixup! doc,tools: properly syntax highlight API ref docs
DerekNonGeneric 0acdfe2
fixup! doc,tools: properly syntax highlight API ref docs
DerekNonGeneric 24ec52f
fixup! doc,tools: properly syntax highlight API ref docs
DerekNonGeneric File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
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: #33363
- Loading branch information
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 | ||
|
|
||
| ## sh.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 hidden or 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 |
|---|---|---|
| @@ -1,25 +1,23 @@ | ||
| .sh_sourceCode { | ||
| .hljs { | ||
| font-weight: normal; | ||
| font-style: normal; | ||
| } | ||
|
|
||
| .sh_sourceCode .sh_symbol, | ||
| .sh_sourceCode .sh_cbracket { | ||
| .hljs-symbol { | ||
| color: #333; | ||
| } | ||
|
|
||
| .sh_sourceCode .sh_keyword { | ||
| .hljs-keyword { | ||
| color: #338; | ||
| } | ||
|
|
||
| .sh_sourceCode .sh_string, | ||
| .sh_sourceCode .sh_regexp, | ||
| .sh_sourceCode .sh_number, | ||
| .sh_sourceCode .sh_specialchar { | ||
| .hljs-string, | ||
| .hljs-regexp, | ||
| .hljs-number { | ||
| color: #E54305; | ||
| } | ||
|
|
||
| .sh_sourceCode .sh_comment { | ||
| .hljs-comment { | ||
| color: #666; | ||
| font-weight: lighter; | ||
| } | ||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.