mirror of
https://github.com/severian-dev/sucker.severian.dev.git
synced 2025-10-28 20:55:44 +00:00
fix: mooth's bug, I like to call it
This commit is contained in:
@@ -46,13 +46,19 @@ function findTagsBetween(content: string, startMarker: string, endMarker: string
|
||||
if (endIdx === -1) return [];
|
||||
|
||||
const section = content.slice(startIdx + startMarker.length + 2, endIdx);
|
||||
const tagRegex = /<([^/>]+)>([^<]+)<\/\1>/g;
|
||||
const matches = Array.from(section.matchAll(tagRegex));
|
||||
const matches: PersonaMatch[] = [];
|
||||
|
||||
return matches.map(match => ({
|
||||
tag: match[1],
|
||||
content: match[2].trim()
|
||||
}));
|
||||
const tagPattern = /<([^/>][^>]*)>([^]*?)<\/\1>/g;
|
||||
let match;
|
||||
|
||||
while ((match = tagPattern.exec(section)) !== null) {
|
||||
matches.push({
|
||||
tag: match[1],
|
||||
content: match[2].trim()
|
||||
});
|
||||
}
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
function extractBetweenTags(content: string, tag: string): string {
|
||||
|
||||
@@ -187,9 +187,9 @@ export default function Home() {
|
||||
<div className="container mx-auto px-4 py-8">
|
||||
<div className="flex justify-between items-center mb-4">
|
||||
<div>
|
||||
<h1 className="text-3xl font-bold">Sucker v1.2</h1>
|
||||
<h1 className="text-3xl font-bold">Sucker v1.3</h1>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
If it's any consolation, I hate making these changes too.
|
||||
I still hate making these changes, but Mooth found a bug so I fixed it.
|
||||
</p>
|
||||
</div>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user