-
-
Notifications
You must be signed in to change notification settings - Fork 25
Description
Is the feature request related to a problem
I have been trying out the https://sli.dev/ library to make some coding-focused slides. It occured to me that it would be nice to use MarkdownSnippets to generate the .md files used by slidev, as then I can ensure the code is compilable/valid C#.
slidev can make use of the magic-move animations, which in turn are configured by adding an extra string after the Markdown code block language specifier. eg.
```csharp {*|4}
// before
public Circum(double radius)
{
return 2 * Math.PI * radius;
}
You can see an example of the slides I've been working on at https://github.com/flcdrg/csharp-refactoring-slidev/, and the current slide Markdown is in https://github.com/flcdrg/csharp-refactoring-slidev/blob/main/slides.md.
The output gets rendered to https://flcdrg.github.io/csharp-refactoring-slidev/1, where you can see how I'm using the animation to demonstrate the changes made when performing various code refactorings.
Describe the solution
I think the ability to capture any 'parameters'/trailing strings after the snippet name, and then append those after the language specifier would allow this.
eg.
Having this:
snippet: EncapsulateVariable-before {*|2}
Could then generate this:
```cs {*|2}
....