如何在Markdown Pandoc中打破长头行? [英] How to break a long headed line in markdown pandoc?

查看:61
本文介绍了如何在Markdown Pandoc中打破长头行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此降价代码中

## 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 a very long line header which 
was written in markdown

导致:

这是一个很长的行头,

是用markdown编写的

This a very long line header which

was written in markdown

使用2次##的策略不起作用

The strategy to use 2 times ## doesn't work

结果(不必要的换行):

result (unnecesary break line):

推荐答案

存在 pandoc问题确切地要求您想要什么,因此,不幸的是目前无法实现.

There's a pandoc issue requesting exactly what you want, so currently it's unfortunately not possible.

您可以使用反斜杠对换行符进行转义,但是,这会在其中插入< br> 标记.

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

如果您仅定位HTML输出,则还可以在markdown中编写原始HTML:

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>

这篇关于如何在Markdown Pandoc中打破长头行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆