mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
[PR #417] [MERGED] Cleanup StringBuilderCache #1005
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/417
Author: @KrisVandermotten
Created: 4/13/2020
Status: ✅ Merged
Merged: 4/18/2020
Merged by: @xoofx
Base:
master← Head:StringBuilderCache📝 Commits (3)
305f722Cleanup StringBuilderCache14fb550Merge branch 'master' into StringBuilderCachea19f783merged from master📊 Changes
8 files changed (+8 additions, -52 deletions)
View changed files
📝
src/Markdig/Helpers/LinkHelper.cs(+0 -2)📝
src/Markdig/Helpers/StringBuilderCache.cs(+2 -14)📝
src/Markdig/MarkdownPipeline.cs(+1 -4)📝
src/Markdig/MarkdownPipelineBuilder.cs(+0 -8)📝
src/Markdig/Parsers/BlockProcessor.cs(+1 -9)📝
src/Markdig/Parsers/InlineProcessor.cs(+1 -8)📝
src/Markdig/Parsers/Inlines/CodeInlineParser.cs(+1 -3)📝
src/Markdig/Parsers/MarkdownParser.cs(+2 -4)📄 Description
StringBuilderCacheused to inherit fromDefaultObjectCache<StringBuilder>, and instances were being passed around.However, nobody was actually using those instances, with one exception:
CodeInlineParser.All other code uses
StringBuilderCache.Local(). As it turns out, there is actually no reason whyCodeInlineParsercould not do the same.This PR changes
StringBuilderCacheto be astatic class, no longer inheriting fromDefaultObjectCache<StringBuilder>. All references to instances are removed.CodeInlineParserwas modified to useStringBuilderCache.Local()as well.It goes without saying that this is a breaking change, as the class and most of the instance references were public.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.