You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its able to take ps1 scripts with comments formatted in markdown and display that in a notebook view. The code is then in a panel and is able to run in the same view like in a Jupyter notebook.
Context "Private or Public? What are the use cases? Parameters? Options?"
This can give additional formatting and "UI" around each Koan for people who just want to see the instructions and code snippet they're working on instead of the whole script.
Hmm, that could prove interesting. I'll have to have a look at how the koans render in the Notebook mode. All the examples given in the blog post are pretty tame, no indication of how a comment inside a scriptblock is rendered...
Perhaps it's worth asking @TylerLeonhardt and possibly others whether a Pester test could be rendered in a specific way that might help us out. 😉
I was wondering if it's possible to define a custom view for the notebook mode? Such that, for example, for PSKoans it could render Describe / Context / It as various heading levels, and then comments more or less where they're at in the code (as Markdown), with the code for each It block being a discrete code block or something.
Activity
vexx32 commentedon Aug 1, 2020
Hmm, that could prove interesting. I'll have to have a look at how the koans render in the Notebook mode. All the examples given in the blog post are pretty tame, no indication of how a comment inside a scriptblock is rendered...
Perhaps it's worth asking @TylerLeonhardt and possibly others whether a Pester test could be rendered in a specific way that might help us out. 😉
TylerLeonhardt commentedon Aug 1, 2020
Pester tests are a weird one because they have huge blocks of code.
Markdown cells in the mix of that would break those up.... Unless the describe blocks are small... But I don't think that's true for PSKoans, right?
vexx32 commentedon Aug 1, 2020
Yeah, not really, no... the general format is:
Many of the
Itblocks have comments, too.I was wondering if it's possible to define a custom view for the notebook mode? Such that, for example, for PSKoans it could render Describe / Context / It as various heading levels, and then comments more or less where they're at in the code (as Markdown), with the code for each
Itblock being a discrete code block or something.TylerLeonhardt commentedon Aug 1, 2020
Yeah this would need a substantial change to Notebook Mode...
With that said, maybe there is an opportunity to implement a Notebook UI in https://github.com/TylerLeonhardt/vscode-powershell-test-adapter
Where the play button would run the test/tests inside the code block.
TylerLeonhardt commentedon Aug 1, 2020
I don't really have time to work on that, but such an experience could be realized that way
vexx32 commentedon Aug 1, 2020
Appreciate the pointers! 💖 It'll be something to look into when I get some time 🙂
github-actions commentedon Sep 21, 2026
This issue has had no activity for 60 days. It will be closed in 30 days unless there is new activity or a maintainer removes the stale label.