[PR #760] [MERGED] Fix source span calculation for LineBreakInline #1211

Open
opened 2026-01-29 14:51:26 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/760
Author: @zickb
Created: 12/14/2023
Status: Merged
Merged: 12/14/2023
Merged by: @xoofx

Base: masterHead: fix_source_span_calculation_for_linebreak_inline


📝 Commits (1)

  • 6f1dce6 Fix last LineBreakInline source span in multi block scenario

📊 Changes

2 files changed (+34 additions, -2 deletions)

View changed files

📝 src/Markdig.Tests/TestSourcePosition.cs (+32 -0)
📝 src/Markdig/Parsers/InlineProcessor.cs (+2 -2)

📄 Description

Fix the source span calculation of the last LineBreakInline in paragraph when multiple blocks exists.

I have added the source span calculation for the last LineBreakInline in https://github.com/xoofx/markdig/pull/733, but the logic does not handle multiple blocks correctly. This corrects the logic.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/xoofx/markdig/pull/760 **Author:** [@zickb](https://github.com/zickb) **Created:** 12/14/2023 **Status:** ✅ Merged **Merged:** 12/14/2023 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `fix_source_span_calculation_for_linebreak_inline` --- ### 📝 Commits (1) - [`6f1dce6`](https://github.com/xoofx/markdig/commit/6f1dce63069c0a688f8e3921cadb538fa4d75829) Fix last LineBreakInline source span in multi block scenario ### 📊 Changes **2 files changed** (+34 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig.Tests/TestSourcePosition.cs` (+32 -0) 📝 `src/Markdig/Parsers/InlineProcessor.cs` (+2 -2) </details> ### 📄 Description Fix the source span calculation of the last `LineBreakInline` in paragraph when multiple blocks exists. I have added the source span calculation for the last `LineBreakInline` in https://github.com/xoofx/markdig/pull/733, but the logic does not handle multiple blocks correctly. This corrects the logic. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 14:51:26 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1211