Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hugo/layouts/shortcodes/tut-menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{- $firstPass := split $raw " > " -}}
{{- $segments := slice -}}
{{- range $firstPass -}}
{{- if contains . "→" -}}
{{- if strings.Contains . "→" -}}
{{- range split . "→" -}}
{{- $segments = $segments | append (trim . " ") -}}
{{- end -}}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"backfill-attachments": "tsx scripts/backfill-attachments.ts",
"preflight:ai-quiz-smoke": "tsx scripts/preflight-ai-quiz-smoke.ts",
"prebuild:shared-bundle": "node scripts/bundle-shared.cjs",
"prebuild:parsers-bundle": "esbuild scripts/parsers/index.ts --bundle --platform=node --format=esm --outfile=srv-qa/lib/parsers.bundle.mjs --external:node:* --banner:js=\"import { createRequire } from 'module'; const require = createRequire(import.meta.url);\"",
"prebuild:parsers-bundle": "esbuild scripts/parsers/index.ts --bundle --platform=node --format=esm --outfile=srv-qa/lib/parsers.bundle.mjs --external:node:* --banner:js=\"import { createRequire as __cjsBundleRequire } from 'module'; const require = __cjsBundleRequire(import.meta.url);\"",
"check:security-annotations": "node scripts/check-hugo-safe-html.cjs",
"check:api-docs-drift": "node scripts/check-api-docs-drift.cjs",
"check:security-txt-drift": "node scripts/check-security-txt-drift.cjs",
Expand Down
2 changes: 1 addition & 1 deletion test/parsers/option-codeblock-indent-css.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('#2820 — trailing code-box indent after OPTION blocks', () => {
'.step-content > .os-options ~ p',
'.step-content > .os-options ~ figure',
'.step-content > .os-options ~ pre',
'.step-content > .os-options ~ blockquote',
'.step-content > .os-options ~ :is(blockquote, aside, details)',
]) {
expect(t).toContain(sel)
}
Expand Down
11 changes: 9 additions & 2 deletions test/parsers/render-blockquote-hook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,15 @@ describe('render-blockquote hook', () => {
expect(t).toMatch(/<blockquote>\s*\{\{[-\s]*\.Text/)
})

it('emits a semantic alert class for alert blockquotes', () => {
it('delegates alert blockquotes to the tut-alert partial, which emits a semantic alert class', () => {
// #2595/#71a8d70bc: the alert branch no longer emits the class inline; it
// delegates to partials/tut-alert.html, passing .AlertType as `type`. The
// semantic `alert alert-<type>` class is emitted by the partial.
const t = readFileSync(p, 'utf8')
expect(t).toContain('class="alert alert-{{ .AlertType }}"')
expect(t).toMatch(/partial\s+"tut-alert\.html"/)
expect(t).toContain('"type" .AlertType')

const partial = readFileSync('hugo/layouts/partials/tut-alert.html', 'utf8')
expect(partial).toContain('class="alert alert-{{ $type }}"')
})
})
7 changes: 5 additions & 2 deletions test/unit/option-tail-leak.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
if (r.status !== 0) {
const msg = `Hugo build failed (exit ${r.status})\nconverted markdown:\n${converted}\nstderr:\n${r.stderr}`;
rmSync(dir, { recursive: true, force: true });
throw new Error(msg);

Check failure on line 94 in test/unit/option-tail-leak.test.ts

View workflow job for this annotation

GitHub Actions / unit

[unit] test/unit/option-tail-leak.test.ts > OPTION group followed by shared prose/image/tips (#2820 regression)

Error: Hugo build failed (exit 1) converted markdown: 2. Access the contents of the downloaded install. 3. Start the graphical installer `hdbsetup`. {{< os-options >}} {{< os-panel os="Windows" >}} ```Shell hdbsetup.exe ``` {{< /os-panel >}} {{< os-panel os="macOS" >}} ```Shell ./hdbsetup ``` {{< /os-panel >}} {{< os-panel os="Linux" >}} ```Shell ./hdbsetup ``` {{< /os-panel >}} {{< /os-options >}} Set the install directory to `C:\SAP\hdbclient` and complete the installation. ![Client install](https://raw.githubusercontent.com/sap-tutorials/Tutorials/master/tutorials/hana-clients-install/download-client.png "Client install") > [!TIP] > If the install fails, run the installer as administrator. > [!TIP] > An older version can be upgraded or uninstalled with `hdbuninst`. 4. After the installation, verify the environment variables. stderr: WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. WARN found no layout file for "html" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination. ❯ renderThroughPipeline test/unit/option-tail-leak.test.ts:94:11 ❯ test/unit/option-tail-leak.test.ts:141:16
}
const html = readFileSync(join(dir, 'public', 'page', 'index.html'), 'utf8');
rmSync(dir, { recursive: true, force: true });
Expand Down Expand Up @@ -155,9 +155,12 @@
expect(text).not.toContain('[!TIP]');
});

it('renders both TIPs as alert-tip blockquotes', () => {
it('renders both TIPs as alert-tip callouts', () => {
// #2595/#71a8d70bc: `> [!TIP]` alerts now render via the tut-alert partial
// as non-collapsible <aside class="alert alert-tip" role="note">, not as
// <blockquote class="alert-tip">.
const $ = load(rendered);
expect($('blockquote.alert-tip').length).toBe(2);
expect($('aside.alert.alert-tip').length).toBe(2);
});

it('renders the trailing image as a tutorial-figure', () => {
Expand Down
Loading