wcoder / highlightjs-line-numbers.js

Line numbering plugin for Highlight.js
https://wcoder.github.io/highlightjs-line-numbers.js/
MIT License
541 stars 125 forks source link

Yaml highlights have extra space #94

Open amshkv opened 1 year ago

amshkv commented 1 year ago

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
wcoder commented 1 year ago

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>