I am trying to add a div around a markdown header in a Lua filter, but the # in front of the title disappear in the output.
Header = function(el)
if el.level == 1 then
local content = el.content
local pre = pandoc.RawBlock('markdown','::: test')
local post = pandoc.RawBlock('markdown',':::')
table.insert(content,1,pre)
table.insert(content, post)
return content
else
return el
end
end
Input:
# Linux
## Support for Linux users
Create a shell script
Expected Output
::: test
# Linux
:::
## Support for Linux users
Create a shell script