Thanks again, something like this should work. I'd prefer to turn it into a regular newline, but haven't figure out how to do that. pandoc.str('\n') doesn't seem to result in any output.
Pandoc -f html -t native shows that <br> is turned into a Linebreak element:pandoc -f html -t native
test <br/>
[ Plain [ Str "test" , LineBreak ] ]So I'd use a filter that converts Linebreaks to Space. Save as removeLinebreak.lua:function Linebreak (elem)return pandoc.Space()endCould be added to the previous one withreturn {{
OrderedList = fixList,
BulletList = fixList,Linebreak = replaceBySpace
}}I think replacing it with a space is the safest. To remove it entirely, you couldn't return nil as Pandoc treats this as "leave unmodified". You'd have to return an empty list instead, I think:function Linebreak (elem)return pandoc.List:new()endBest,
JOn Tuesday, February 28, 2023 at 12:28:55 AM UTC JDTS wrote:One other quick question: pandoc parses <br> as linebreak, and translates that into org as double-backslash \\. Any way to disable this?