Skip to content

Add support for ### headings in markdown parsing#2

Closed
leMineGaming with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-1
Closed

Add support for ### headings in markdown parsing#2
leMineGaming with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-1

Conversation

Copilot AI commented Jul 10, 2025

Copy link
Copy Markdown

This PR adds support for ### (triple hash) headings in the MDparser PowerPoint add-in, ensuring that these headings and their content stay together on slides without being split inappropriately.

Problem

Previously, ### headings were not explicitly handled by the parser and were treated as regular text content. This caused them to be processed without proper styling and could result in content being split between slides in undesired ways.

Solution

The implementation adds detection and proper handling for ### headings:

  • Detection: Added pattern matching for lines starting with ### in both body processing sections
  • Styling: Sub-headings are rendered with bold 22pt font (between 26pt subtitles and 18pt regular text)
  • Positioning: ### headings stay within their parent slide and don't create new slides
  • Content preservation: Content following ### headings remains on the same slide

Changes Made

  1. Enhanced parsing logic in MainRibbon.cs:

    • Added ### detection in both body content processing loops
    • Extended AddParagraphWithFormatting method with isSubHeading parameter
    • Added appropriate formatting for sub-headings (bold, 22pt, no bullets)
  2. Updated documentation in README.md:

    • Added ### Sub-subheading to the features list
    • Clarified that ### headings don't split content between slides

Font Hierarchy

  • 32pt: # main titles
  • 26pt: ## subtitles (bold)
  • 22pt: ### sub-headings (bold) ← NEW
  • 18pt: Regular content

Example

# Main Title

## Subtitle
Regular content here.

### Sub-section
This content stays with the ### heading.
More content on the same slide.

### Another Sub-section
This also stays together.

The ### headings are now properly styled and keep their content together, preventing unwanted slide splits.

Fixes #1.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add support for ### Titles Add support for ### headings in markdown parsing Jul 10, 2025
Copilot AI requested a review from leMineGaming July 10, 2025 19:29
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.

Add support for ### Titles

2 participants