Markdown 中的嵌套引号无法正常工作
我对 Markdown 中的引号有问题。 当我有这样的东西时:
text
> quoted text
> > deeper layer
> > > even deeper layer
它工作正常。但是当有一个层不那么深的答复时:
> quoted text
> > deeper layer
> > > even deeper layer
> > from second layer again
i see your point there
它没有发挥应有的作用。它只是将引用不那么深的文本附加到当前的块引用层。
我怎样才能获得当前行之前的块引用标签的引号层?
I have problem with quotes in markdown.
when i have something like this:
text
> quoted text
> > deeper layer
> > > even deeper layer
it works fine. but when there is a reply with a layer not so deep:
> quoted text
> > deeper layer
> > > even deeper layer
> > from second layer again
i see your point there
its not working as it should. its just appending the not so deeply quoted text to the current layer of blockquote.
How can i just get the layer of quotes of blockquote-tags before the current line?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过在三级文本和随后的二级文本之间添加一个空行?
某物
其他的东西
看起来像这样:
编辑
由于这仍然是一个悬而未决的问题,为什么不尝试跟踪当前连续的
>
数量。当遇到较少的行时,在其前面插入一个空行。Have you tried putting a blank line in between the level-three text and the level-two text that follows?
Something
Something else
Which looks like this:
EDIT
Since this is still an open issue, why don't you try keeping track of the current number of
>
's in a row you have. When you encounter a line with fewer, insert a blank line before it.始终在每个回复级别之间添加一个“空白”行。
(我所说的“空白”行实际上是指:没有任何文本的行,但包含与之前引用级别相同数量的
>
。)例如:
上面是由本网站的 Markdown 渲染的解析器/渲染器如下,符合您的需求:
如果您有硬包装的段落(如您的示例中所示),则始终包含空行是更正确、更统一的方法。有关更多详细信息,请阅读我的其他答案下的评论,复制如下:
Always add a "blank" line between each reply level.
(By "blank" line, I actually mean: a line with no text, but containing the same number of
>
as the previous quote level.)For example:
The above is rendered by this website's Markdown parser/renderer as the following, which matches what you want:
Always including a blank line is the more correct, more uniform approach if you have hard-wrapped paragraphs (like in your example). For more details, read my comment under the other answer, reproduced here: