mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
14 lines
No EOL
490 B
Lua
14 lines
No EOL
490 B
Lua
function Header(header)
|
|
local level = header.level
|
|
local identifier = header.identifier
|
|
local anchor = pandoc.RawInline('html', '<a style="margin-right: 15px" href="#' .. identifier .. '">#</a>')
|
|
|
|
-- Create a list of inline elements containing the anchor and header content
|
|
local new_content = pandoc.List({anchor})
|
|
for _, elem in ipairs(header.content) do
|
|
new_content:insert(elem)
|
|
end
|
|
|
|
return pandoc.Header(level, new_content, identifier)
|
|
end
|
|
|