wcoder / highlightjs-line-numbers.js

Line numbering plugin for Highlight.js

Home Page:https://wcoder.github.io/highlightjs-line-numbers.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yaml highlights have extra space

amshkv opened this issue · comments

Describe the bug
When using the line-number-plugin yaml highlights, multilines have an extra space
without line-numbers all aligned to the left edge

To Reproduce
https://codepen.io/Keda37/pen/ExRddRR - on/off hljs.initLineNumbersOnLoad();

Screenshots
Снимок экрана 2022-12-02 в 13 08 59
image

Thanks for the report!

Looks like plugin generates extra tags:
Screen Shot 2022-12-02 at 7 09 35 PM

Workaround

Add more line breaks:

<pre><code class="language-yaml hljs">
multiline_1: |
  Multiline
  String

multiline_2: |
  Multiline
  String

multiline_3: |
  Multiline
  String

multiline_1:
  - Multiline
  - Multilne

multiline_2: Multiline
multiline_3: Multiline
</code></pre>