Skip to content

Fix code block formatting when no blank line before block #36

@schuyler

Description

@schuyler

Problem

Code blocks immediately following text (without a blank line) render on a single line instead of preserving line breaks.

Example

Here is some code:

function test() {
return true;
}

The code block above renders as a single line in MacDown, but GitHub renders it correctly as multiple lines.

Impact

  • Markdown parsing compatibility issue with GitHub
  • Makes code blocks unreadable when proper spacing isn't used
  • Different behavior than standard Markdown parsers

Source

Based on issue #1333 from MacDownApp/macdown
MacDownApp/macdown#1333

Priority

HIGH - Compatibility issue with standard Markdown parsing

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions