evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
Create a footnote rendering system that transforms Markdown with footnotes into customized HTML output with language-specific labels.
Your system should:
[^1] syntax)Implement a function compileWithFootnotes(markdown, options) that:
footnoteLabel (string): The label shown before the footnotes sectionfootnoteBackLabel (string): The accessible label for back-to-reference linksclobberPrefix (string): The prefix for IDs to avoid collisionsvalue property from the compilation result)Given Markdown with a footnote reference [^1] and definition [^1]: First note, compiling with default options produces JavaScript output @test
Given Markdown with multiple footnotes, compiling with footnoteLabel: "Notes" produces output where the footnotes section uses "Notes" as the heading @test
Given Markdown with footnotes, compiling with clobberPrefix: "doc-" produces output with IDs prefixed with "doc-" @test
/**
* Compiles Markdown with footnotes using custom configuration
* @param {string} markdown - The Markdown source with footnotes
* @param {Object} options - Configuration options
* @param {string} options.footnoteLabel - Label for the footnotes section
* @param {string} options.footnoteBackLabel - Accessible label for back-references
* @param {string} options.clobberPrefix - ID prefix to prevent collisions
* @returns {Promise<string>} The compiled JavaScript code
*/
export async function compileWithFootnotes(markdown, options) {
// Implementation
}Provides MDX compilation capabilities with configurable markdown-to-HTML transformation.
Provides GitHub Flavored Markdown support including footnote syntax.