You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: allow heading icons to be a function, provide section nesting as input
## Details
Request: #286
This change allows `heading.icons` to be a function which returns a
`string` that will be used as the icon. The input to the function is an
`integer[]` which describes the nesting level of the current heading at
all parent levels.
An example configuration would look like:
```lua
require('render-markdown').setup({
heading = {
icons = function(sections)
return table.concat(sections, '.') .. '. '
end,
},
})
```
Which when rendering:
```
# Foo
# Bar
## Baz
```
Results in:
```
1. Foo
2. Bar
2.1. Baz
```
0 commit comments