or run

tessl search
Log in

Version

Files

tile.json

task.mdevals/scenario-10/

MDX Paragraph Checker

A utility that analyzes how MDX handles paragraph wrapping for different content types.

Capabilities

Compiles and analyzes MDX content

  • Compiles MDX with a standalone JSX component <Alert /> and returns analysis showing it was not wrapped in a paragraph @test
  • Compiles MDX with plain text content "Hello world" and returns analysis showing it was wrapped in a paragraph @test
  • Compiles MDX with a JSX element containing children <div>Content</div> and returns analysis showing it was not wrapped in a paragraph @test

Implementation

@generates

API

/**
 * Analyzes paragraph wrapping behavior in compiled MDX output.
 *
 * @param {string} mdxContent - The MDX source code to compile and analyze
 * @returns {Promise<{isWrappedInParagraph: boolean, compiledOutput: string}>}
 *   Object containing whether the content was wrapped in a paragraph tag
 *   and the compiled JavaScript code
 */
async function analyzeParagraphWrapping(mdxContent) {
  // IMPLEMENTATION HERE
}

module.exports = { analyzeParagraphWrapping };

Dependencies { .dependencies }

@mdx-js/mdx { .dependency }

MDX compiler that transforms MDX documents into executable JavaScript. Provides the compile function to transform MDX source code.

@satisfied-by