Skip to content

Fix markdown code block nesting in Part 9 README#174

Merged
jongalloway merged 2 commits intomainfrom
copilot/fix-25e89367-5bdd-456b-a381-0107f875d772
Oct 5, 2025
Merged

Fix markdown code block nesting in Part 9 README#174
jongalloway merged 2 commits intomainfrom
copilot/fix-25e89367-5bdd-456b-a381-0107f875d772

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 5, 2025

Problem

The Part 9 README contained a sample markdown code block that was ending prematurely due to improper nesting. The section "Create Package README" showed a sample PACKAGE_README.md file within a markdown code block, but this outer block contained nested code blocks (bash, json, text) that caused the parser to close the outer block too early.

This resulted in:

  • The outer markdown block closing at the first nested \``` delimiter (around line 196)
  • The remaining content rendering as raw text instead of formatted markdown
  • Lines 283-285 showing malformed closing syntax (\``textfollowed by````)

Solution

Changed the outer markdown code block to use 4 backticks instead of 3. This is the standard solution for nesting code blocks in markdown - the outer fence must have more backticks than any inner fence.

Changes:

  • Line 178: \``markdown````markdown`
  • Line 283: Replaced malformed closing with \````

Result

The sample README now renders correctly with all nested code examples (bash, json, text) properly displayed within the outer markdown block, and subsequent documentation sections appear in their correct context.

Fixes #25

Original prompt

This section details on the original issue you should resolve

<issue_title>The Sample Readme markdown block in Part 9 ends early</issue_title>
<issue_description>In Part 9 there is a section that directs the reader to add professional documentation to the project and presents a block of markdown code. This is improperly nested and the markdown block ends, followed by rendered HTML in the docs.

https://github.com/dotnet-presentations/ai-workshop/blob/main/Part%209%20-%20MCP%20Publishing/README.md#create-package-readme

Remember that you can nest markdown using more than 3 ` characters as long as they match:

here is a sample

````markdown
nested

```markdown
and nested even more
```

````</issue_description>

## Comments on the Issue (you are @copilot in this section)

<comments>
</comments>
Fixes #173

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Co-authored-by: jongalloway <68539+jongalloway@users.noreply.github.com>
Copilot AI changed the title [WIP] The Sample Readme markdown block in Part 9 ends early Fix markdown code block nesting in Part 9 README Oct 5, 2025
Copilot AI requested a review from jongalloway October 5, 2025 02:46
@jongalloway jongalloway marked this pull request as ready for review October 5, 2025 03:09
@jongalloway jongalloway merged commit c6d2b15 into main Oct 5, 2025
1 of 3 checks passed
@jongalloway jongalloway deleted the copilot/fix-25e89367-5bdd-456b-a381-0107f875d772 branch October 5, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Sample Readme markdown block in Part 9 ends early

3 participants