Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix endSnippet block getting removed for missing snippet - #397

#397
Merged
SimonCropp merged 3 commits into
SimonCropp:masterSimonCropp/MarkdownSnippets:masterfrom
mysticmind:fix_end_snippet_block_removalmysticmind/MarkdownSnippets:fix_end_snippet_block_removalCopy head branch name to clipboard
Jun 1, 2021
Merged

Fix endSnippet block getting removed for missing snippet#397
SimonCropp merged 3 commits into
SimonCropp:masterSimonCropp/MarkdownSnippets:masterfrom
mysticmind:fix_end_snippet_block_removalmysticmind/MarkdownSnippets:fix_end_snippet_block_removalCopy head branch name to clipboard

Conversation

@mysticmind

@mysticmind mysticmind commented Jun 1, 2021

Copy link
Copy Markdown
Contributor
  • Fix endSnippet block getting removed for a missing snippet with
    config InPlaceOverwrite
  • Wrap ** Count not find snippet... in a fenced code block.

- Fix endSnippet block getting removed for a missing snippet with
config InPlaceOverwrite
- Wrap the ** Count not find snippet in a fenced code block.
@mysticmind

mysticmind commented Jun 1, 2021

Copy link
Copy Markdown
Contributor Author

The problem is outlined below:
In markdown, the following is the content with InPlaceOverwrite:

<!-- snippet: sample_FindJsonUserByUsername -->
<!-- endSnippet -->

When I run mdsnippets tool or via msbuild for a missing snippet, it strips off <!-- endSnippet --> as below:

<!-- snippet: sample_FindJsonUserByUsername -->
** Could not find snippet 'sample_FindJsonUserByUsername' **

This PR fixes the same.

I couldn't figure out a way to add unit tests for this case, please provide some clues, I will try to add the same.

FYI, I am using MarkdownSnippets for Marten v4 docs which is currently being worked upon by me.

@SimonCropp

Copy link
Copy Markdown
Owner

can u add a test to verify this change

@mysticmind

Copy link
Copy Markdown
Contributor Author

I couldn't figure out a way to add unit tests for this case, please provide some clues, I will try to add the same.

I had added the above in my comment, still checking to see how to add a unit test.

@mysticmind

Copy link
Copy Markdown
Contributor Author

@SimonCropp I am closing this PR for now. I am able to reproduce the issue using the latest NuGet version 23.1.3. But not on the latest codebase on Git.

@mysticmind mysticmind closed this Jun 1, 2021
@mysticmind

Copy link
Copy Markdown
Contributor Author

I was able to reproduce this in the latest code in repo, I am committing the test shortly for your review.

@mysticmind mysticmind reopened this Jun 1, 2021
@mysticmind

mysticmind commented Jun 1, 2021

Copy link
Copy Markdown
Contributor Author

@SimonCropp the PR is ready for your review and next steps. Also it would be super helpful if you could release it to NuGet at the earliest once you confirm this PR is good. Thank you!

@SimonCropp SimonCropp added this to the 23.1.4 milestone Jun 1, 2021
@SimonCropp SimonCropp added the Bug label Jun 1, 2021
@SimonCropp
SimonCropp merged commit 8770f70 into SimonCropp:master Jun 1, 2021
@SimonCropp

Copy link
Copy Markdown
Owner

thanks. deployed

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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.