docs: replace README with Next.js boilerplate template

Updated README.md from a detailed OllaHub project description to the standard Next.js getting started template, likely to initialize or reset the project as a Next.js application.
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-28 12:51:19 -03:00
1 parent 58e5522700
commit a3f8226fda
42 files changed
+4465 -314

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
export function extractCodeBlocks(
text: string
): Array<{ language: string; code: string }> {
const regex = /```(\w+)?\n([\s\S]*?)```/g;
const blocks: Array<{ language: string; code: string }> = [];
let match: RegExpExecArray | null;
while ((match = regex.exec(text)) !== null) {
const language = match[1] || "text";
const code = match[2]?.trimEnd() || "";
blocks.push({ language, code });
}
return blocks;
}
export function stripMarkdown(md: string): string {
// Remove code blocks first
let plain = md.replace(/```[\s\S]*?```/g, (block) =>
block.replace(/```[\s\S]*?\n/, "").replace(/```$/, "")
);
// Remove inline code
plain = plain.replace(/`([^`]+)`/g, "$1");
// Remove common markdown syntax
plain = plain
.replace(/(^|\s)[#>*_~`-]+/g, " ")
.replace(/\[(.*?)\]\((.*?)\)/g, "$1");
return plain;
}