|
1 |
| -*render-markdown.txt* For 0.10.0 Last change: 2024 December 06 |
| 1 | +*render-markdown.txt* For 0.10.0 Last change: 2024 December 07 |
2 | 2 |
|
3 | 3 | ==============================================================================
|
4 | 4 | Table of Contents *render-markdown-table-of-contents*
|
@@ -422,8 +422,10 @@ Default Configuration ~
|
422 | 422 | -- If a function is provided both of these values are passed in using 1 based indexing
|
423 | 423 | -- If a list is provided we index into it using a cycle based on the level
|
424 | 424 | -- If the value at that level is also a list we further index into it using a clamp based on the index
|
425 |
| - ordered_icons = function(level, index) |
426 |
| - return string.format('%d.', index) |
| 425 | + ordered_icons = function(level, index, value) |
| 426 | + value = vim.trim(value) |
| 427 | + local value_index = tonumber(value:sub(1, #value - 1)) |
| 428 | + return string.format('%d.', value_index > 1 and value_index or index) |
427 | 429 | end,
|
428 | 430 | -- Padding to add to the left of bullet point
|
429 | 431 | left_pad = 0,
|
@@ -915,8 +917,10 @@ Bullet Point Configuration ~
|
915 | 917 | -- If a function is provided both of these values are passed in using 1 based indexing
|
916 | 918 | -- If a list is provided we index into it using a cycle based on the level
|
917 | 919 | -- If the value at that level is also a list we further index into it using a clamp based on the index
|
918 |
| - ordered_icons = function(level, index) |
919 |
| - return string.format('%d.', index) |
| 920 | + ordered_icons = function(level, index, value) |
| 921 | + value = vim.trim(value) |
| 922 | + local value_index = tonumber(value:sub(1, #value - 1)) |
| 923 | + return string.format('%d.', value_index > 1 and value_index or index) |
920 | 924 | end,
|
921 | 925 | -- Padding to add to the left of bullet point
|
922 | 926 | left_pad = 0,
|
|
0 commit comments