mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-15 21:51:57 +00:00
[PR #829] [MERGED] Fix incorrect emphasis span calculation. #1236
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/xoofx/markdig/pull/829
Author: @snnz
Created: 12/9/2024
Status: ✅ Merged
Merged: 12/17/2024
Merged by: @xoofx
Base:
master← Head:fix-emphasis-span📝 Commits (1)
a11899aFixes emphasis span calculation. A test is added.📊 Changes
2 files changed (+15 additions, -5 deletions)
View changed files
📝
src/Markdig.Tests/TestSourcePosition.cs(+11 -0)📝
src/Markdig/Parsers/Inlines/EmphasisInlineParser.cs(+4 -5)📄 Description
EmphasisInlineParserdid not take into account the case of extra delimiter characters before the emphasis. For example:**foo*The supplied test produces the following result in the current version:
The emphasis intersects with the literal before it - obviously wrong. The effect of this can be seen in the Visual Studio editor: it displays the first asterisk as italics.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.