Line number at the beginning of code lines.
Obviously, this is supposed to work only for code blocks (<pre><code>
) and not for inline code.
Add class line-numbers to your desired <pre>
and line-numbers plugin will take care.
Optional: You can specify the data-start
(Number) attribute on the <pre>
element. It will shift the line counter.
Optional: To support multiline line numbers using soft wrap add css white-space
to pre-line
or pre-wrap
.
Please note the data-start="-5"
in the code below.
This raw text
is not highlighted
but it still has
lines numbers