Compare commits
8 Commits
fd3f4c82c5
...
v1.3.21
| Author | SHA1 | Date | |
|---|---|---|---|
| 5821a5dee4 | |||
| dfc7536268 | |||
| 9f26a179fa | |||
| 5043058660 | |||
| a37091ad71 | |||
| 9539aa35eb | |||
| 3ad24ef615 | |||
| 3018ae5412 |
@@ -12,14 +12,17 @@ export default function AVB() {
|
|||||||
.map((b) => b.trim())
|
.map((b) => b.trim())
|
||||||
.filter((b) => b !== "");
|
.filter((b) => b !== "");
|
||||||
|
|
||||||
const title = rawBlocks[0]?.replace(/^#\s+/, "") || "Allgemeine Verkaufsbedingungen";
|
// Extract title and stand more robustly
|
||||||
const stand = rawBlocks[1] || "Stand: April 2026";
|
const title = rawBlocks.find(b => b.startsWith("# "))?.replace(/^#\s+/, "") || "Allgemeine Verkaufsbedingungen";
|
||||||
|
const stand = rawBlocks.find(b => b.toLowerCase().startsWith("stand:")) || "Stand: April 2026";
|
||||||
|
|
||||||
const sections: { title: string; content: string[] }[] = [];
|
const sections: { title: string; content: string[] }[] = [];
|
||||||
let currentSection: { title: string; content: string[] } | null = null;
|
let currentSection: { title: string; content: string[] } | null = null;
|
||||||
|
|
||||||
// Skip title and stand
|
// Process sections, skipping title and stand blocks
|
||||||
rawBlocks.slice(2).forEach((block) => {
|
rawBlocks.forEach((block) => {
|
||||||
|
if (block.startsWith("# ") || block.toLowerCase().startsWith("stand:")) return;
|
||||||
|
|
||||||
if (block.startsWith("##")) {
|
if (block.startsWith("##")) {
|
||||||
// New section header: e.g. "## 1. Geltungsbereich"
|
// New section header: e.g. "## 1. Geltungsbereich"
|
||||||
if (currentSection) sections.push(currentSection);
|
if (currentSection) sections.push(currentSection);
|
||||||
@@ -28,9 +31,7 @@ export default function AVB() {
|
|||||||
content: []
|
content: []
|
||||||
};
|
};
|
||||||
} else if (currentSection) {
|
} else if (currentSection) {
|
||||||
// Content block: might be multiple paragraphs if not split by double newline,
|
// Clean up bold markers for better display
|
||||||
// but here each block is one "paragraph" due to our split logic.
|
|
||||||
// We clean up bold markers for better display if they are just numbering.
|
|
||||||
const cleanedBlock = block.replace(/\*\*(.*?)\*\*/g, "$1");
|
const cleanedBlock = block.replace(/\*\*(.*?)\*\*/g, "$1");
|
||||||
currentSection.content.push(cleanedBlock);
|
currentSection.content.push(cleanedBlock);
|
||||||
}
|
}
|
||||||
@@ -94,8 +95,9 @@ export default function AVB() {
|
|||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
|
||||||
<div className="pt-8 border-t border-slate-100">
|
<div className="pt-8 border-t border-slate-100 flex justify-between items-center text-slate-400 text-sm italic">
|
||||||
<p className="font-bold text-primary">{footer}</p>
|
<p>{footer}</p>
|
||||||
|
<p>{stand}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
2
next-env.d.ts
vendored
2
next-env.d.ts
vendored
@@ -1,6 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
import "./.next/dev/types/routes.d.ts";
|
import "./.next/types/routes.d.ts";
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mb-grid-solutions.com",
|
"name": "mb-grid-solutions.com",
|
||||||
"version": "1.3.15",
|
"version": "1.3.21",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@10.18.3",
|
"packageManager": "pnpm@10.18.3",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
799
pnpm-lock.yaml
generated
799
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -90,7 +90,8 @@ async function main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Listen for console.error and console.warn messages (like Next.js Image warnings, hydration errors, CSP blocks)
|
// Listen for console.error and console.warn messages (like Next.js Image warnings, hydration errors, CSP blocks)
|
||||||
page.on('console', (msg) => {
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
page.on('console', (msg: any) => {
|
||||||
const type = msg.type();
|
const type = msg.type();
|
||||||
if (type === 'error' || type === 'warn') {
|
if (type === 'error' || type === 'warn') {
|
||||||
const text = msg.text();
|
const text = msg.text();
|
||||||
|
|||||||
@@ -14,5 +14,5 @@
|
|||||||
".next/types/**/*.ts",
|
".next/types/**/*.ts",
|
||||||
".next/dev/types/**/*.ts"
|
".next/dev/types/**/*.ts"
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules", "tests", "tests_bak"]
|
"exclude": ["node_modules", "tests", "tests_bak", "scripts"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { defineConfig } from 'vitest/config';
|
import { defineConfig } from 'vitest/config';
|
||||||
import react from '@vitejs/plugin-react';
|
import react from '@vitejs/plugin-react';
|
||||||
|
import { fileURLToPath } from 'url';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
@@ -16,11 +17,11 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
globals: true,
|
globals: true,
|
||||||
setupFiles: ['./tests/setup.tsx'],
|
setupFiles: ['./tests/setup.tsx'],
|
||||||
alias: {
|
alias: [
|
||||||
'next/server': 'next/server.js',
|
{ find: 'next/server', replacement: 'next/server.js' },
|
||||||
'@payload-config': new URL('./tests/__mocks__/payload-config.ts', import.meta.url).pathname,
|
{ find: '@payload-config', replacement: fileURLToPath(new URL('./tests/__mocks__/payload-config.ts', import.meta.url)) },
|
||||||
'@': new URL('./', import.meta.url).pathname,
|
{ find: '@', replacement: fileURLToPath(new URL('./', import.meta.url)) },
|
||||||
},
|
],
|
||||||
exclude: ['**/node_modules/**', '**/.next/**'],
|
exclude: ['**/node_modules/**', '**/.next/**'],
|
||||||
server: {
|
server: {
|
||||||
deps: {
|
deps: {
|
||||||
|
|||||||
Reference in New Issue
Block a user