How to break a long headed line in markdown pandoc?

*爱你&永不变心* 提交于 2021-02-04 21:18:07

问题


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

code

result (unnecesary break line):

result


回答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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!