Add line numbers options
MurhafSousli opened this issue · comments
Murhaf Sousli commented
Discussed in #273
Originally posted by Szabo December 1, 2023
The Line Numbers plugin supports the display of line numbers for single line sources. This is disabled by default. It would be great to have a configuration option so that this can be configured from the app.module.
Murhaf Sousli commented
In v11, You can use the line numbers options as directive inputs
<pre>
<code [highlightAuto]="code"
lineNumbers
singleLine
startFrom="5"></code>
</pre>
Or globally
export const appConfig: ApplicationConfig = {
providers: [
provideHighlightOptions({
fullLibraryLoader: () => import('highlight.js'),
lineNumbersOptions: {
singleLine: true,
startFrom: 5
}
})
]
};