Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9f26a179fa | |||
| 5043058660 | |||
| a37091ad71 | |||
| 9539aa35eb | |||
| 3ad24ef615 | |||
| 3018ae5412 |
@@ -12,14 +12,17 @@ export default function AVB() {
|
||||
.map((b) => b.trim())
|
||||
.filter((b) => b !== "");
|
||||
|
||||
const title = rawBlocks[0]?.replace(/^#\s+/, "") || "Allgemeine Verkaufsbedingungen";
|
||||
const stand = rawBlocks[1] || "Stand: April 2026";
|
||||
// Extract title and stand more robustly
|
||||
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[] }[] = [];
|
||||
let currentSection: { title: string; content: string[] } | null = null;
|
||||
|
||||
// Skip title and stand
|
||||
rawBlocks.slice(2).forEach((block) => {
|
||||
// Process sections, skipping title and stand blocks
|
||||
rawBlocks.forEach((block) => {
|
||||
if (block.startsWith("# ") || block.toLowerCase().startsWith("stand:")) return;
|
||||
|
||||
if (block.startsWith("##")) {
|
||||
// New section header: e.g. "## 1. Geltungsbereich"
|
||||
if (currentSection) sections.push(currentSection);
|
||||
@@ -28,9 +31,7 @@ export default function AVB() {
|
||||
content: []
|
||||
};
|
||||
} else if (currentSection) {
|
||||
// Content block: might be multiple paragraphs if not split by double newline,
|
||||
// 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.
|
||||
// Clean up bold markers for better display
|
||||
const cleanedBlock = block.replace(/\*\*(.*?)\*\*/g, "$1");
|
||||
currentSection.content.push(cleanedBlock);
|
||||
}
|
||||
@@ -94,8 +95,9 @@ export default function AVB() {
|
||||
</div>
|
||||
))}
|
||||
|
||||
<div className="pt-8 border-t border-slate-100">
|
||||
<p className="font-bold text-primary">{footer}</p>
|
||||
<div className="pt-8 border-t border-slate-100 flex justify-between items-center text-slate-400 text-sm italic">
|
||||
<p>{footer}</p>
|
||||
<p>{stand}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mb-grid-solutions.com",
|
||||
"version": "1.3.15",
|
||||
"version": "1.3.19",
|
||||
"type": "module",
|
||||
"packageManager": "pnpm@10.18.3",
|
||||
"scripts": {
|
||||
|
||||
@@ -90,7 +90,7 @@ async function main() {
|
||||
});
|
||||
|
||||
// Listen for console.error and console.warn messages (like Next.js Image warnings, hydration errors, CSP blocks)
|
||||
page.on('console', (msg) => {
|
||||
page.on('console', (msg: any) => {
|
||||
const type = msg.type();
|
||||
if (type === 'error' || type === 'warn') {
|
||||
const text = msg.text();
|
||||
|
||||
@@ -14,5 +14,5 @@
|
||||
".next/types/**/*.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
],
|
||||
"exclude": ["node_modules", "tests", "tests_bak"]
|
||||
"exclude": ["node_modules", "tests", "tests_bak", "scripts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user