github markdown 中不一致的无样式链接列表
Unstyled list of links inconsistent across github markdown
我想要 github wiki/documentation 上的无样式链接列表。我的假设 adam-p's markdown cheatsheet 是按一下 <enter>
键应该会断开该行。
但是这样:
[link1](#link1)
[link2](#link2)
[link3](#link3)
在 Github wiki 页面上呈现如下:
但是在问题页面上它呈现不同:
我需要一个在块中显示的无样式链接列表。为什么它在 Github 网站上不一致?这是一个错误还是我合法地需要使用类似 <br>
标签的东西?
更新
在每行末尾添加 2 个空格可以断开该行,但它似乎也会断开链接。
更新 2
通过与@Chris 聊天并进一步调查,发现断开链接问题仅在编辑页面而不是创建页面时出现。完全相同的 md 渲染效果很好。因此我们把它归结为一个特例。
发生这种情况的原因可能是 the API documentation for the Markdown rendering service 上显示的内容。我将最重要的部分加粗了:
The rendering mode. Can be either:
markdown
to render a document as plain Markdown, just like README files are rendered.
gfm
to render a document as user-content, e.g. like user comments or issues are rendered. In GFM mode, hard line breaks are always taken into account, and issue and user mentions are linked accordingly.
因此,出于某种原因,GitHub 选择支持两种略有不同的模型,具体取决于 Markdown 代码所在的位置。
I need an unstyled list of links displayed in a block.
假设这意味着您想要在问题中看到的行为,其中每个 link 出现在一个新行中,您可以通过在每个项目后面加上两个尾随空格来实现它。这是 how <br>
tags are represented in the original Markdown implementation:
When you do want to insert a <br />
break tag using Markdown, you end a line with two or more spaces, then type return.
这应该适用于 GitHub 呈现 Markdown 的任何地方。
我想要 github wiki/documentation 上的无样式链接列表。我的假设 adam-p's markdown cheatsheet 是按一下 <enter>
键应该会断开该行。
但是这样:
[link1](#link1)
[link2](#link2)
[link3](#link3)
在 Github wiki 页面上呈现如下:
我需要一个在块中显示的无样式链接列表。为什么它在 Github 网站上不一致?这是一个错误还是我合法地需要使用类似 <br>
标签的东西?
更新
在每行末尾添加 2 个空格可以断开该行,但它似乎也会断开链接。
更新 2
通过与@Chris 聊天并进一步调查,发现断开链接问题仅在编辑页面而不是创建页面时出现。完全相同的 md 渲染效果很好。因此我们把它归结为一个特例。
发生这种情况的原因可能是 the API documentation for the Markdown rendering service 上显示的内容。我将最重要的部分加粗了:
The rendering mode. Can be either:
markdown
to render a document as plain Markdown, just like README files are rendered.
gfm
to render a document as user-content, e.g. like user comments or issues are rendered. In GFM mode, hard line breaks are always taken into account, and issue and user mentions are linked accordingly.
因此,出于某种原因,GitHub 选择支持两种略有不同的模型,具体取决于 Markdown 代码所在的位置。
I need an unstyled list of links displayed in a block.
假设这意味着您想要在问题中看到的行为,其中每个 link 出现在一个新行中,您可以通过在每个项目后面加上两个尾随空格来实现它。这是 how <br>
tags are represented in the original Markdown implementation:
When you do want to insert a
<br />
break tag using Markdown, you end a line with two or more spaces, then type return.
这应该适用于 GitHub 呈现 Markdown 的任何地方。