stakx-io/stakx

Add support for line highlighting in code blocks

Closed this issue · 0 comments

Since CommonMark allows for anything to exist in the "info string", let's add support for our code blocks to be highlighted.

image

```html{2}
<div>
  <p>I wish I wish I was a fish</p>
</div>
```

Markdown Engine: src/allejo/stakx/MarkupEngine/MarkdownEngine.php

Proposed Syntax

  • html{4} - highlight the 4th line of the code block
  • html{4-5} - highlight the 4th through 5th lines of code
  • html{1,4-5} - highlight the 1st and 4th through 5th line of code separately