mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-09 13:56:56 +00:00
Apply foreach on class StringLineGroup got phantom empty line, is it expected?
#645
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?
Originally created by @Akarinnnnn on GitHub (Dec 11, 2023).
I' m writing code to dump a
FencedCodeBlock, here is the function:Then I see output contains suspicious empty line like this:
And the corresponding markdown is:
```
characters.sifeng.voice("c1s1", 3)
```
After some investigation, I found the enumerator of
StringLineGroupreturns internal array's enumerator directly. The array contains reserved slot for future item adding, that's the reason why we see phantom empty lines.Shall we change the
GetEnumerator()forStringLineGroup? I can provide some help.@xoofx commented on GitHub (Dec 11, 2023):
Yep most likely, you can make a PR for a fix, thanks!
@Akarinnnnn commented on GitHub (Dec 11, 2023):
Sorry for using incorrect email address. I will use correct information to commit later.