list - Markdown:在嵌套列表之后继续列表中的文本

标签 list markdown

我需要在列表中插入一个子列表,然后继续项目中的文本:

1. Start of the item text
    - First item of sublist;
    - Second item of sublist;

More text of the first item.

2. Second Item

3. Third item

渲染后嵌套列表后的文本未正确对齐(应与“Start”对齐,与“1.”对齐)。有什么建议吗?

最佳答案

文本应与数字后的文本左对齐,然后呈现的文本将与其对齐。

这是你的例子:

1. Start of the item text
    - First item of sublist;
    - Second item of sublist;
      
      More text of the sublist of the first item.
The pending text of "More text of the sublist of the first item."

  More text of the first item.
The pending text of "More text of the first item."

2. Second Item

3. Third item

第一行文本有两个字符:1 . 在文本内容之前有一个空格 Start of...

那么你要对齐的文本在的文本内容之前也应该有3个空格 >更多文本...

另外,在文本内容之前有<=N个空格(N表示列表上下文的前缀文本的长度,本例中N=3)会使内容与此对齐列表文本

例如 1 ~ 3 空格将使文本与第一行文本对齐,4 ~ 6 空格将使文本与第一行文本对齐使文本与第二行文本对齐,

关于list - Markdown:在嵌套列表之后继续列表中的文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67228510/

相关文章:

java - 无界通配符类型 List<?> 和原始类型 List 有什么区别?

github - 是否可以同时满足 Github 和 Doxygen 的方式编写 Markdown 链接?

python - 将列表写入 Excel

Python:将列表链接在一起

C# 按实现拆分接口(interface)列表

delphi - 如何让 markdown.js 在 Delphi 的 TWebBrowser 中将 Markdown 文档显示为 HTML?

github - 如何将徽章/盾牌添加到github仓库中?

image - 如何在当前目录中的 GitLab markdown 中引用路径以 ./dot 斜杠开头的图像?

GO Lang Markdown 应用

python - 列表没有属性条