[PR #334] [MERGED] fix code inline normalize #952

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

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/334
Author: @OpportunityLiu
Created: 4/29/2019
Status: Merged
Merged: 5/10/2019
Merged by: @xoofx

Base: masterHead: master


📝 Commits (3)

📊 Changes

2 files changed (+48 additions, -12 deletions)

View changed files

📝 src/Markdig.Tests/TestNormalize.cs (+14 -8)
📝 src/Markdig/Renderers/Normalize/Inlines/CodeInlineRenderer.cs (+34 -4)

📄 Description

The old normalize renderer only use two `` for code inlines which contain `.

Add:

  1. When n of continuous ` is included in the content, n+1 of ` will be used as delimiter.
  2. When the content starts or ends with `, a space will be added to separate delimiter and content.
  3. When the content is empty, a space will be used as content to prevent it be rendered to ``.
    a. `` 
    b. ` `
    
    a. ``
    b.

🔄 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/334 **Author:** [@OpportunityLiu](https://github.com/OpportunityLiu) **Created:** 4/29/2019 **Status:** ✅ Merged **Merged:** 5/10/2019 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (3) - [`b720208`](https://github.com/xoofx/markdig/commit/b7202084d2f572ab6c8cc0fcbf5f9b6895cba34b) fix code inline normalize - [`e33281b`](https://github.com/xoofx/markdig/commit/e33281b8aea55334cd24d643ac2697d7ed29244a) optimize - [`dd4d1b3`](https://github.com/xoofx/markdig/commit/dd4d1b349f14b5b5819cf133f1efdb47dbc70177) lf as line ending ### 📊 Changes **2 files changed** (+48 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig.Tests/TestNormalize.cs` (+14 -8) 📝 `src/Markdig/Renderers/Normalize/Inlines/CodeInlineRenderer.cs` (+34 -4) </details> ### 📄 Description The old normalize renderer only use two ``` `` ``` for code inlines which contain `` ` ``. Add: 1. When `n` of continuous `` ` `` is included in the content, `n+1` of `` ` `` will be used as delimiter. 2. When the content starts or ends with `` ` ``, a space will be added to separate delimiter and content. 3. When the content is empty, a space will be used as content to prevent it be rendered to ``` `` ```. ``` a. `` b. ` ` ``` a. `` b. ` ` --- <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:47:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#952