scala-cli
scala-cli copied to clipboard
Ignore scala code blocks in markdown sources
Is your feature request related to a problem? Please describe. I would like to ignore some of the scala snippets in Markdown document. Sometimes in blog posts or documentation it's useful to show an example that does not compile, but still compile the rest of the code.
Describe the solution you'd like
I would like to be able to define a markdown code with ignore keyword which will instruct scala-cli to ignore this code block during compilation.
```scala ignore
println(a)
```
This seems consistent with already existing test and reset keywords.
Describe alternatives you've considered
Currently we can prevent compiling markdown source by removing scala from beginning of the markdown code block, but this also removes Scala-specific syntax highlighting added by external tools.
It seems that the ignore keyword also already exists. And also works, please see the attached gif. Maybe we can update also the docs to include the ignore keyword.