问题
In this markdown code
## This a very long line header which was written in markdown
I'd like to split the long line in 2 lines but maintaining the style of header.
This is wrong intent:
## This a very long line header which
was written in markdown
result in:
This a very long line header which
was written in markdown
The strategy to use 2 times ## doesn't work
result (unnecesary break line):
回答1:
There's a pandoc issue requesting exactly what you want, so currently it's unfortunately not possible.
You can escape the newline with a backslash, however, this will insert a <br>
tag there.
# This a very long line header which \
was written in markdown
If you're only targeting HTML output you can also just write raw HTML in markdown:
<h1>This a very long line header which
was written in markdown</h1>
来源:https://stackoverflow.com/questions/33266938/how-to-break-a-long-headed-line-in-markdown-pandoc