Skip to content

Commit b7253fb

Browse files
authored
Merge branch 'main' into patch-3
2 parents 19ade44 + 84f7774 commit b7253fb

30 files changed

+214
-189
lines changed

.github/workflows/codeql-analysis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
# Initializes the CodeQL tools for scanning.
3535
- name: Initialize CodeQL
36-
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571
36+
uses: github/codeql-action/init@05963f47d870e2cb19a537396c1f668a348c7d8f
3737
with:
3838
languages: ${{ matrix.language }}
3939
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -44,7 +44,7 @@ jobs:
4444
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
4545
# If this step fails, then you should remove it and run the build manually (see below)
4646
- name: Autobuild
47-
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571
47+
uses: github/codeql-action/autobuild@05963f47d870e2cb19a537396c1f668a348c7d8f
4848

4949
# ℹ️ Command-line programs to run using the OS shell.
5050
# 📚 https://git.io/JvXDl
@@ -58,4 +58,4 @@ jobs:
5858
# make release
5959

6060
- name: Perform CodeQL Analysis
61-
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571
61+
uses: github/codeql-action/analyze@05963f47d870e2cb19a537396c1f668a348c7d8f

.github/workflows/scorecards-analysis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ jobs:
4949

5050
# Upload the results to GitHub's code scanning dashboard.
5151
- name: "Upload to code-scanning"
52-
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571
52+
uses: github/codeql-action/upload-sarif@05963f47d870e2cb19a537396c1f668a348c7d8f
5353
with:
5454
sarif_file: results.sarif

eleventy.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export default function (eleventyConfig) {
9191

9292
eleventyConfig.addPassthroughCopy('src/content/assets/dash');
9393
eleventyConfig.addPassthroughCopy('src/content/assets/js');
94+
eleventyConfig.addPassthroughCopy({'site-shared/packages/inject_dartpad/lib/inject_dartpad.js': 'assets/js/inject_dartpad.js'});
9495
eleventyConfig.addPassthroughCopy('src/content/assets/img', { expand: true });
9596
eleventyConfig.addPassthroughCopy('src/content/f', {
9697
expand: true,

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,19 @@
2323
},
2424
"devDependencies": {
2525
"@11ty/eleventy": "3.0.0-alpha.5",
26-
"firebase-tools": "^13.4.0",
26+
"firebase-tools": "^13.5.2",
2727
"hast-util-from-html": "^2.0.1",
2828
"hast-util-select": "^6.0.2",
2929
"hast-util-to-text": "^4.0.0",
3030
"html-minifier-terser": "^7.2.0",
3131
"js-yaml": "^4.1.0",
32-
"markdown-it": "^14.0.0",
32+
"markdown-it": "^14.1.0",
3333
"markdown-it-anchor": "^8.6.7",
3434
"markdown-it-attrs": "^4.1.6",
3535
"markdown-it-container": "^4.0.0",
3636
"markdown-it-deflist": "^3.0.0",
3737
"markdown-it-table": "^4.1.1",
38-
"sass": "^1.71.1",
39-
"shiki": "^1.1.7"
38+
"sass": "^1.72.0",
39+
"shiki": "^1.2.0"
4040
}
4141
}

pnpm-lock.yaml

+30-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/_11ty/plugins/highlight.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,9 @@ function _highlight(
8080
language,
8181
attributeString,
8282
) {
83-
// Don't customize or highlight DartPad snippets
84-
// so that inject_embed can convert them.
85-
if (language.includes('-dartpad') || language.includes('file-')) {
86-
return `<pre><code class="language-${language}">
87-
${markdown.utils.escapeHtml(content)}
88-
</code></pre>`;
83+
// Specially handle DartPad snippets so that inject_embed can convert them.
84+
if (language.includes('-dartpad')) {
85+
return `<pre><code data-dartpad="true" data-embed="true" data-theme="light">${markdown.utils.escapeHtml(content)}</code></pre>`;
8986
}
9087

9188
const attributes = _parseAttributes(attributeString);

src/_11ty/plugins/markdown.js

-23
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export const markdown = (() => {
3030
});
3131

3232
_registerAsides(markdown);
33-
_registerContainers(markdown);
3433

3534
return markdown;
3635
})();
@@ -100,25 +99,3 @@ function _registerAsides(markdown) {
10099

101100
_registerAside(markdown, 'secondary', null, null, 'alert-secondary');
102101
}
103-
104-
/**
105-
* Registers custom containers used on the site.
106-
*
107-
* @param {import('markdown-it/lib').MarkdownIt} markdown
108-
* @private
109-
*/
110-
function _registerContainers(markdown) {
111-
// TODO(parlough): Consider removing all usages of mini-toc.
112-
markdown.use(markdownItContainer, 'mini-toc', {
113-
render: function (tokens, index) {
114-
if (tokens[index].nesting === 1) {
115-
const header = /\s+(.*)/.exec(tokens[index].info)[1];
116-
return `<div class="mini-toc">
117-
<h4 class="no_toc">${header}</h4>
118-
`;
119-
} else {
120-
return '</div>\n';
121-
}
122-
},
123-
});
124-
}

src/_sass/_site.scss

+6-14
Original file line numberDiff line numberDiff line change
@@ -460,20 +460,6 @@ li.card {
460460
margin: 0 auto;
461461
}
462462

463-
.mini-toc {
464-
@extend .alert;
465-
background-color: $gray-light;
466-
467-
h4 {
468-
margin-top: 0;
469-
}
470-
471-
ul {
472-
padding-left: 1.5rem;
473-
margin-bottom: 0;
474-
}
475-
}
476-
477463
.table {
478464
width: 100%;
479465
@extend .table-striped;
@@ -588,9 +574,15 @@ thead:has(th:empty) {
588574
.content > p {
589575
> i.material-symbols, > span.material-symbols {
590576
vertical-align: bottom;
577+
user-select: none;
591578
}
592579
}
593580

581+
// Make icons used in system requirements table unselectable.
582+
.system-support {
583+
user-select: none;
584+
}
585+
594586
// Overwrite bootstrap's breadcrumbs
595587
.breadcrumb {
596588
align-items: center;

src/_sass/components/_code.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pre {
187187
}
188188

189189
// Border and resizability for dartpad
190-
iframe[src^="https://dartpad"]:not(#try-dart-pad), iframe[src^="https://old-dartpad"] {
190+
iframe[src^="https://dartpad"]:not(#try-dart-pad) {
191191
border: 1px solid #ccc;
192192
margin-bottom: 1rem;
193193
min-height: 400px;

src/content/codelabs/async-await.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Asynchronous programming: futures, async, await"
33
description: Learn about and practice writing asynchronous code in DartPad!
4-
js: [{url: 'https://old-dartpad-3ce3f.web.app/inject_embed.dart.js', defer: true}]
4+
js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
55
---
66
<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g"?>
77
<?code-excerpt plaster="none"?>

src/content/codelabs/dart-cheatsheet.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Dart cheatsheet codelab
33
description: Interactively learn (or relearn) some of Dart's unique features.
4-
js: [{url: 'https://old-dartpad-3ce3f.web.app/inject_embed.dart.js', defer: true}]
4+
js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
55
---
66
<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g"?>
77

src/content/codelabs/iterables.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Iterable collections
33
description: An interactive guide to using Iterable objects such as lists and sets.
4-
js: [{url: 'https://old-dartpad-3ce3f.web.app/inject_embed.dart.js', defer: true}]
4+
js: [{url: '/assets/js/inject_dartpad.js', defer: true}]
55
---
66
<?code-excerpt replace="/ *\/\/\s+ignore_for_file:[^\n]+\n//g; /(^|\n) *\/\/\s+ignore:[^\n]+\n/$1/g; /(\n[^\n]+) *\/\/\s+ignore:[^\n]+\n/$1\n/g"?>
77
<?code-excerpt plaster="none"?>

0 commit comments

Comments
 (0)