Skip to content

Commit 2b36119

Browse files
dependabot[bot]Copilotchagong
authored
build(deps): bump highlight.js from 10.5.0 to 11.11.1 (#1561)
* build(deps): bump highlight.js from 10.5.0 to 11.11.1 Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.5.0 to 11.11.1. - [Release notes](https://github.com/highlightjs/highlight.js/releases) - [Changelog](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md) - [Commits](highlightjs/highlight.js@10.5.0...11.11.1) --- updated-dependencies: - dependency-name: highlight.js dependency-version: 11.11.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Fix highlight.js v11 API compatibility (#1568) * Initial plan * Initial plan for highlight.js upgrade Co-authored-by: chagong <831821+chagong@users.noreply.github.com> * Fix highlight.js API usage for v11 compatibility Co-authored-by: chagong <831821+chagong@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: chagong <831821+chagong@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: chagong <831821+chagong@users.noreply.github.com> Co-authored-by: Changyong Gong <shawn.gong@hotmail.com>
1 parent 275de31 commit 2b36119

File tree

3 files changed

+27
-10
lines changed

3 files changed

+27
-10
lines changed

package-lock.json

Lines changed: 24 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
"expand-tilde": "^2.0.2",
393393
"fs-extra": "^11.3.0",
394394
"hdr-histogram-js": "^3.0.1",
395-
"highlight.js": "10.5.0",
395+
"highlight.js": "11.11.1",
396396
"jdk-utils": "^0.4.4",
397397
"jquery": "^3.6.1",
398398
"lodash": "^4.17.23",

src/formatter-settings/assets/features/formatterSettings/components/Highlight.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// Licensed under the MIT license.
33

44
import * as React from "react";
5-
import * as hljs from "highlight.js";
5+
import hljs from "highlight.js";
66
import "../../../../../../webview-resources/highlight.css";
77

88
export function highlight(content: string): JSX.Element {
9-
const highlighted = hljs.highlight("java", content);
9+
const highlighted = hljs.highlight(content, { language: "java" });
1010
return (
1111
<pre className="hljs d-flex flex-grow-1">
1212
<code className="hljs flex-grow-1" dangerouslySetInnerHTML={{ __html: highlighted.value }} />

0 commit comments

Comments
 (0)