feat: implement Markdown domain in GitHub API simulator - #47
Open
pmcelhaney with Copilot wants to merge 4 commits into
Open
feat: implement Markdown domain in GitHub API simulator#47pmcelhaney with Copilot wants to merge 4 commits into
pmcelhaney with Copilot wants to merge 4 commits into
Conversation
Copilot created this pull request from a session on behalf of
pmcelhaney
July 20, 2026 15:37
View session
pmcelhaney
marked this pull request as ready for review
July 20, 2026 15:49
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Jul 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /markdownandPOST /markdown/rawpreviously returned random stub responses. This implements a functional Markdown-to-HTML renderer backed by a properContextclass, with deterministic output and correct response headers.Original Prompt
Implement Markdown domain in the GitHub API simulator and create a PR
Manual acceptance tests
POST /markdownwith{"text": "# Hello"}returns 200 withContent-Type: text/htmland body containing<h1>Hello</h1>POST /markdownwith{"text": "**bold** and *italic*"}returns body with<strong>bold</strong>and<em>italic</em>POST /markdownwith{"text": "See #42", "mode": "gfm", "context": "octocat/hello-world"}returns a link tohttps://github.com/octocat/hello-world/issues/42POST /markdown/rawwith plain-text body# Rawreturns 200 and body containing<h1>Raw</h1>X-CommonMarker-Versionheader<script>returns<script>— not a live tagTasks
routes/markdown/_.context.ts— newContextclass; renders headings, paragraphs, bold/italic/strikethrough, inline code, fenced code blocks (with language class), lists, blockquotes, HR, links, images, and GFM issue refs (#42→<a href="…">); escapes HTML in code blocksroutes/markdown.ts— delegates to context; setsContent-Type,Content-Length,X-CommonMarker-Versionroutes/markdown/raw.ts— delegates torenderRaw(); setsX-CommonMarker-Versionroutes/_.context.ts— addsMarkdownContextdelegation:renderMarkdown,renderRaw,commonMarkerVersiontest-support/create-context.ts— registers/markdowncontext pathtest-support/create-response.ts— shared response builder mock with arbitrary header-chain supporttest/markdown.context.test.ts— 15 unit tests forContexttest/markdown.routes.test.ts— 5 HTTP-level route tests