Implemented a #L10-20 syntax for files, and #M-MethodName syntax for CSharp methods #715
+138
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there,
To make it easier to reference certain parts of code, I've added two new functions:
The purpose of this is to allow people to add a reference to a file, and indicate which line number range to include - instead of having to include everything.
The purpose of this is to allow people to add a reference to a file, and indicate method to include. This way you don't have to add regions to your codebase, and you can use specific methods as a reference.
I had some issues compiling and running parts of the code, but I managed to compile the MarkdownSnippets.Tool.exe and test the functionality on my own project. But I might have missed some things in usecases I haven't tried.
I've added the new logic to the
FileToSnippet
logic which creates anSnippet
DTO, so the syntax is getting parsed and handled pretty high up in the program flow, without affecting lower level functions