code-surfer
code-surfer copied to clipboard
Allow prism-diff to be used for highlight
So far Code Surfer uses diff
to add steps that advance steps (e.g. change focus). However, it would be nice to show the highlighted diff
itself.
The workaround seems to be
import 'prismjs/components/prism-diff';
Prism.languages.diff2 = Prism.languages.diff;
...
<CodeSurfer>
```diff2
val helloWorld = "Hello world"
val world = "world"
@Benchmark
fun junit4() {
- Assert.assertTrue(
- "$helloWorld should contain $world",
- helloWorld.contains(world)
- )
+ Assertions.assertTrue(helloWorld.contains(world)) {
+ "$helloWorld should contain $world"
+ }
}
```
</CodeSurfer>
Hey, thanks for all the feedback. I'm currently focusing on another project but will check your issues when I find some time for Code Surfer.
Great. I was not sure if I should continue creating those :)
So far I'm able to pass through with workarounds, so there's no rush in fixing c-s.