nunomaduro/termwind

[Feature] Code highlighter

butschster opened this issue · 2 comments

What do you think if use Highlighter from nunomaduro/collision for rendering code snippets.

Something like this

<code line="18" start-line="14">
  /** @test */
  function sentryReport()
  {
    try {
      throw new \Exception('Something went wrong');
    } catch (\Throwable $e) {
      report($e);
    }
  }
</code>

Will output

      14▕     /** @test */
      15▕     function sentryReport()
      16▕     {
      17▕         try {
  ➜  18▕             throw new \Exception('Something went wrong');
      19▕         } catch (\Throwable $e) {
      20▕             report($e);
      21▕         }
      22▕     }

@nunomaduro what do you think of this?

This is over 9000. Love it.