Skip to content

Commit 5ced966

Browse files
Bump marked and hosted-git-info (#1525)
* Update index.hbs * Update marked * Update ci-cd.yml * Marked 9 * Marked latest * Fix lint * Update hosted-git-info * Update index.hbs
1 parent 1e7c0d9 commit 5ced966

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

.github/workflows/ci-cd.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ jobs:
103103
- ember-beta
104104
- ember-canary
105105
- embroider-safe
106-
- embroider-optimized
107106
timeout-minutes: 7
108107
steps:
109108
- name: Check out a copy of the repo

addon/utils/compile-markdown.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { marked } from 'marked';
2+
import { markedHighlight } from 'marked-highlight';
23
import { parse as htmlParse } from 'node-html-parser';
34
import { parse as hbsParse } from '@handlebars/parser';
45
import lineColumn from 'line-column';
@@ -113,6 +114,13 @@ const hbsComponent = {
113114

114115
marked.use({ extensions: [htmlComponent, hbsComponent] });
115116

117+
marked.use(
118+
markedHighlight({
119+
langPrefix: 'hljs language-',
120+
highlight: highlightCode,
121+
}),
122+
);
123+
116124
/**
117125
This function is used when `compileMarkdown` encounters code blocks while
118126
rendering Markdown source.
@@ -185,7 +193,6 @@ export function highlightCode(code, language) {
185193
*/
186194
export default function compileMarkdown(source, config) {
187195
let markedOptions = {
188-
highlight: highlightCode,
189196
renderer: new HBSRenderer(config),
190197
};
191198

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,15 @@
7676
"fs-extra": "^11.1.0",
7777
"git-repo-info": "^2.1.1",
7878
"highlight.js": "^11.9.0",
79-
"hosted-git-info": "^6.1.1",
79+
"hosted-git-info": "^7.0.1",
8080
"html-entities": "^2.3.2",
8181
"jsdom": "^20.0.0",
8282
"json-api-serializer": "^2.6.6",
8383
"line-column": "^1.0.2",
8484
"lodash": "^4.17.21",
8585
"lunr": "^2.3.9",
86-
"marked": "^4.0.12",
86+
"marked": "^11.1.0",
87+
"marked-highlight": "^1.0.2",
8788
"node-html-parser": "^6.1.4",
8889
"pad-start": "^1.0.2",
8990
"parse-git-config": "^3.0.0",

yarn.lock

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9214,13 +9214,20 @@ hosted-git-info@^4.0.0, hosted-git-info@^4.0.1:
92149214
dependencies:
92159215
lru-cache "^6.0.0"
92169216

9217-
hosted-git-info@^6.0.0, hosted-git-info@^6.1.1:
9217+
hosted-git-info@^6.0.0:
92189218
version "6.1.1"
92199219
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-6.1.1.tgz#629442c7889a69c05de604d52996b74fe6f26d58"
92209220
integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w==
92219221
dependencies:
92229222
lru-cache "^7.5.1"
92239223

9224+
hosted-git-info@^7.0.1:
9225+
version "7.0.1"
9226+
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-7.0.1.tgz#9985fcb2700467fecf7f33a4d4874e30680b5322"
9227+
integrity sha512-+K84LB1DYwMHoHSgaOY/Jfhw3ucPmSET5v98Ke/HdNSw4a0UktWzyW1mjhjpuxxTqOOsfWT/7iVshHmVZ4IpOA==
9228+
dependencies:
9229+
lru-cache "^10.0.1"
9230+
92249231
html-encoding-sniffer@^3.0.0:
92259232
version "3.0.0"
92269233
resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz#2cb1a8cf0db52414776e5b2a7a04d5dd98158de9"
@@ -10681,6 +10688,11 @@ lowercase-keys@^3.0.0:
1068110688
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2"
1068210689
integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==
1068310690

10691+
lru-cache@^10.0.1:
10692+
version "10.1.0"
10693+
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.1.0.tgz#2098d41c2dc56500e6c88584aa656c84de7d0484"
10694+
integrity sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==
10695+
1068410696
lru-cache@^5.1.1:
1068510697
version "5.1.1"
1068610698
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@@ -10828,10 +10840,15 @@ markdown-it@^4.3.0:
1082810840
mdurl "~1.0.0"
1082910841
uc.micro "^1.0.0"
1083010842

10831-
marked@^4.0.12:
10832-
version "4.3.0"
10833-
resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3"
10834-
integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==
10843+
marked-highlight@^1.0.2:
10844+
version "1.0.2"
10845+
resolved "https://registry.yarnpkg.com/marked-highlight/-/marked-highlight-1.0.2.tgz#1b6844df56bb0aa7ca19a08123b46d84f51008c6"
10846+
integrity sha512-Jh+4nqS3KxsOJfh7k8wgtvVAXPydrVgkgggmQgdrtmK5I+0b27cIYfW8YYYzxGgMy1JCZTRygr58CMhvZqFULA==
10847+
10848+
marked@^11.1.0:
10849+
version "11.1.0"
10850+
resolved "https://registry.yarnpkg.com/marked/-/marked-11.1.0.tgz#f2d12323e80ba8a97cc8262fe7e94fcc007476ab"
10851+
integrity sha512-fvKJWAPEafVj1dwGwcPI5mBB/0pvViL6NlCbNDG1HOIRwwAU/jeMoFxfbRLuirO1wRH7m4yPvBqD/O1wyWvayw==
1083510852

1083610853
matcher-collection@^1.0.0, matcher-collection@^1.1.1:
1083710854
version "1.1.2"

0 commit comments

Comments
 (0)