linenumbers
Display text with line numbers.
def linenumbers(
value: string,
autoescape: boolean = True
) - > string
Display text with line numbers.
Parameters
| Name | Type | Description |
|---|---|---|
| value | string | The raw text content to be formatted with line numbers. |
| autoescape | boolean = True | Determines whether the input text should be HTML-escaped before line numbers are applied. |
Returns
| Type | Description |
|---|---|
string | The input text with each line prefixed by its corresponding line number, zero-padded to match the width of the total line count. |