[PR #529] [MERGED] Cache the MarkdownParser & Processors #1093

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

📋 Pull Request Information

Original PR: https://github.com/xoofx/markdig/pull/529
Author: @MihaZupan
Created: 3/12/2021
Status: Merged
Merged: 3/15/2021
Merged by: @xoofx

Base: masterHead: cache-parsers


📝 Commits (2)

  • 80ed85e Cache the MarkdownParser & Processors
  • 2f95884 Add missing null check

📊 Changes

6 files changed (+238 additions, -193 deletions)

View changed files

📝 src/Markdig/Markdown.cs (+3 -3)
📝 src/Markdig/Parsers/BlockProcessor.cs (+70 -67)
📝 src/Markdig/Parsers/InlineProcessor.cs (+78 -20)
📝 src/Markdig/Parsers/MarkdownParser.cs (+76 -100)
📝 src/Markdig/Polyfills/NullableAttributes.cs (+9 -1)
📝 src/Markdig/Syntax/Block.cs (+2 -2)

📄 Description

  • MarkdownParser is made static (had private ctor before)
  • Block/InlineProcessor got a set of Setup/Rent/Reset/Release methods
Markdown.Parse("Hello world!");

Before:
image

After:
image


🔄 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/529 **Author:** [@MihaZupan](https://github.com/MihaZupan) **Created:** 3/12/2021 **Status:** ✅ Merged **Merged:** 3/15/2021 **Merged by:** [@xoofx](https://github.com/xoofx) **Base:** `master` ← **Head:** `cache-parsers` --- ### 📝 Commits (2) - [`80ed85e`](https://github.com/xoofx/markdig/commit/80ed85e2a8a41d068d87808845f9c4f785433fba) Cache the MarkdownParser & Processors - [`2f95884`](https://github.com/xoofx/markdig/commit/2f9588498cca981b71abbfe2ff142a897cecf6ab) Add missing null check ### 📊 Changes **6 files changed** (+238 additions, -193 deletions) <details> <summary>View changed files</summary> 📝 `src/Markdig/Markdown.cs` (+3 -3) 📝 `src/Markdig/Parsers/BlockProcessor.cs` (+70 -67) 📝 `src/Markdig/Parsers/InlineProcessor.cs` (+78 -20) 📝 `src/Markdig/Parsers/MarkdownParser.cs` (+76 -100) 📝 `src/Markdig/Polyfills/NullableAttributes.cs` (+9 -1) 📝 `src/Markdig/Syntax/Block.cs` (+2 -2) </details> ### 📄 Description - `MarkdownParser` is made static (had private ctor before) - `Block/InlineProcessor` got a set of Setup/Rent/Reset/Release methods ```c# Markdown.Parse("Hello world!"); ``` Before: ![image](https://user-images.githubusercontent.com/25307628/110969439-fd99ae00-8358-11eb-88c2-e9d44dd04ed5.png) After: ![image](https://user-images.githubusercontent.com/25307628/110969571-1dc96d00-8359-11eb-9899-dd19df1e29b2.png) --- <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:49:40 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#1093