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
A very long header will be broken in typst writer.
E.g.
A markdown with a very long header:
# a very very very very very very very very very very very very very very very very very very very very very long header
Use pandoc command:
pandoc t.md -f markdown -t typst -s -o t.typ
The following typst documents will be generated:
= a very very very very very very very very very very very very very
very very very very very very very very long header
<a-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long-header>
I used a lua filter to temporarily fix it:
return {
{
-- Fix pandoc header error, pandoc will add break line in in very long headerHeader=function(el)
ifFORMAT:match"typst" thenlocaltext=""for_, iinpairs(el.content) doifi.t=="Str" thentext=text..i.textelseifi.t=="Space" thentext=text..""endendreturnpandoc.RawInline("typst", "#heading(level: " ..el.level..")[" ..text.."]")
endend
},
}
I think it should be easy to fix, but I don't know Haskell at all so can't help further.
Pandoc version?
version: 3.1.8
os: Darwin Kernel Version 22.6.0
The text was updated successfully, but these errors were encountered:
Explain the problem.
A very long header will be broken in typst writer.
E.g.
A markdown with a very long header:
# a very very very very very very very very very very very very very very very very very very very very very long header
Use pandoc command:
The following typst documents will be generated:
I used a lua filter to temporarily fix it:
I think it should be easy to fix, but I don't know Haskell at all so can't help further.
Pandoc version?
version: 3.1.8
os: Darwin Kernel Version 22.6.0
The text was updated successfully, but these errors were encountered: