Skip to content

Fixes #94 - Removing code sections on toc creation#95

Merged
MaxMelcher merged 1 commit intoMaxMelcher:mainfrom
cpetry:main
Feb 11, 2022
Merged

Fixes #94 - Removing code sections on toc creation#95
MaxMelcher merged 1 commit intoMaxMelcher:mainfrom
cpetry:main

Conversation

@chrPetry
Copy link
Copy Markdown
Contributor

Removed multiline code sections, add UnitTests

var contentWithoutCode = new List<string>();
for(var i=0; i < contents.Count; i++)
{
var contentWithoutCodeSection = Regex.Replace(contents[i], "^[ \t]*```[^`]*```", "", RegexOptions.Multiline);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chrPetry

This doesn't include sections defined with ~ or spaces

I found this in my testing. I can submit a change for it but giving you the option first 👍🏻

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are free to add this!
Didn't know that you could use ~ or spaces for code sections :O

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants