Skip to content
Discussion options

You must be logged in to vote

You can use @tarleb 's Lua filter to convert <br> into a hard break regardless of the output format: https://stackoverflow.com/a/52193443

--- Transform a raw HTML element which contains only a `<br>`
-- into a format-indepentent line break.
function RawInline (el)
  if el.format:match '^html' and el.text:match '%<br ?/?%>' then
    return pandoc.LineBreak()
  end
end

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@DanOvando
Comment options

Answer selected by DanOvando
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants