fix: md footnote

This commit is contained in:
Han Xiao 2025-03-19 18:47:26 +08:00
parent 63999ba739
commit adb087415c
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ import {
buildMdFromAnswer,
chooseK, fixCodeBlockIndentation,
removeExtraLineBreaks,
removeHTMLtags, repairMarkdownFootnotesSimple
removeHTMLtags, repairMarkdownFootnotesOuter
} from "./utils/text-tools";
import {MAX_QUERIES_PER_STEP, MAX_REFLECT_PER_STEP, MAX_URLS_PER_STEP, Schemas} from "./utils/schemas";
import {formatDateBasedOnType, formatDateRange} from "./utils/date-tools";
@ -916,7 +916,7 @@ But unfortunately, you failed to solve the issue. You need to think out of the b
(thisStep as AnswerAction).mdAnswer =
fixBadURLMdLinks(
fixCodeBlockIndentation(
repairMarkdownFootnotesSimple(
repairMarkdownFootnotesOuter(
await fixMarkdown(
buildMdFromAnswer((thisStep as AnswerAction)),
allKnowledge,

View File

@ -159,7 +159,7 @@ ${formatReferences(references)}
* A variant of the function that only takes a markdown string
* It extracts existing footnote definitions and uses them as references
*/
export function repairMarkdownFootnotesSimple(markdownString: string): string {
export function repairMarkdownFootnotesOuter(markdownString: string): string {
// Remove outer code fence if it exists
// First trim the string to handle any extra whitespace
markdownString = markdownString.trim();