Skip to content

Preserve blank lines when rendering Markdown - #282

Merged
vswamidass-sfdc merged 4 commits into
mainfrom
cursor/fix-markdown-list-headings
Nov 20, 2026
Merged

vswamidass-sfdc merged 4 commits into
mainfrom
cursor/fix-markdown-list-headings

Conversation

@vswamidass-sfdc

Copy link
Copy Markdown
Collaborator

Summary

  • Stop deleting every blank line before Markdown is rendered. Those blank lines are what close a list, so the next heading was being swallowed into the previous item as literal ## text and later lists kept numbering.
  • Document and doc-list views now call render_markdown directly. The helper only strips leading blank lines.
  • Answers still collapse runs of three or more newlines, which leaves the single blank line a list needs.

Test plan

  • Render a document whose Markdown has a numbered or bullet list, a blank line, then a ## heading. The heading should be a heading, and the following list should start over.
  • Confirm a document that begins with blank lines still does not render a leading empty paragraph.
  • Check an answer that contains extra blank lines still renders with normal spacing.

…adings.

Stripping every blank line pulled the next heading into the previous list item as literal text.
ubuntu-latest no longer publishes Ruby 3.3.8, so setup-ruby was returning 404.
@vswamidass-sfdc
vswamidass-sfdc marked this pull request as ready for review November 20, 2026 20:18
Rails 8.1.4 and several dependencies were below the patched versions the lint job requires.
The SAST check flags the mutable v1 tag on both CI jobs.
@vswamidass-sfdc
vswamidass-sfdc merged commit 68e0c01 into main Nov 20, 2026
5 checks passed
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.

2 participants