Revert #1597 - Update to highlight.js 11.0.

This commit is contained in:
Eric Huss 2021-08-02 08:02:13 -07:00
parent db337d4a6f
commit 68d8ceec47
4 changed files with 8 additions and 1338 deletions

View File

@ -121,7 +121,7 @@ Unfortunately at this time we don't have any automated UI or browser testing, so
The following are instructions for updating [highlight.js](https://highlightjs.org/). The following are instructions for updating [highlight.js](https://highlightjs.org/).
1. Clone the repository at <https://github.com/highlightjs/highlight.js> 1. Clone the repository at <https://github.com/highlightjs/highlight.js>
1. Check out a tagged release (like `11.0.0`). 1. Check out a tagged release (like `10.1.1`).
1. Run `npm install` 1. Run `npm install`
1. Run `node tools/build.js :common apache armasm coffeescript d handlebars haskell http julia nginx properties r scala x86asm yaml` 1. Run `node tools/build.js :common apache armasm coffeescript d handlebars haskell http julia nginx properties r scala x86asm yaml`
1. Compare the language list that it spits out to the one in [`syntax-highlighting.md`](https://github.com/camelid/mdBook/blob/master/guide/src/format/theme/syntax-highlighting.md). If any are missing, add them to the list and rebuild (and update these docs). If any are added to the common set, add them to `syntax-highlighting.md`. 1. Compare the language list that it spits out to the one in [`syntax-highlighting.md`](https://github.com/camelid/mdBook/blob/master/guide/src/format/theme/syntax-highlighting.md). If any are missing, add them to the list and rebuild (and update these docs). If any are added to the common set, add them to `syntax-highlighting.md`.

View File

@ -47,11 +47,9 @@ your own `highlight.js` file:
- objectivec - objectivec
- perl - perl
- php - php
- php-template
- plaintext - plaintext
- properties - properties
- python - python
- python-repl
- r - r
- ruby - ruby
- rust - rust
@ -61,7 +59,6 @@ your own `highlight.js` file:
- sql - sql
- swift - swift
- typescript - typescript
- vbnet
- x86asm - x86asm
- xml - xml
- yaml - yaml

View File

@ -169,9 +169,9 @@ function playground_text(playground) {
Array Array
code_nodes code_nodes
.filter(function (node) {return !node.classList.contains("editable"); }) .filter(function (node) {return !node.classList.contains("editable"); })
.forEach(function (block) { hljs.highlightElement(block); }); .forEach(function (block) { hljs.highlightBlock(block); });
} else { } else {
code_nodes.forEach(function (block) { hljs.highlightElement(block); }); code_nodes.forEach(function (block) { hljs.highlightBlock(block); });
} }
// Adding the hljs class gives code blocks the color css // Adding the hljs class gives code blocks the color css

File diff suppressed because one or more lines are too long