Kirby: MarkdownExtra doesn't produce wanted paragraphes, renders line-breaks instead

ぃ、小莉子 提交于 2019-12-11 20:42:50

问题


I'm currently getting my head around http://getkirby.com and am very pleased to far. I activated Markdown Extra which comes shipped with Kirby so I can use Markdown within div-elements.

This works pretty well until the point where I need to create separate paragraphes of text, like so:

<div class="my-class" markdown="1">
    This is the first paragraph

    This is the second paragraph
</div>

Instead of rendering it like this:

<div class="my-class">
    <p>This is the first paragraph</p>

    <p>This is the second paragraph</p>
</div>

I get this result:

<div class="my-class">
    <p>This is the first paragraph<br />
    This is the second paragraph</p>
</div>

Is this wanted behavior I can control or is there something wrong with the parser?

Thanks for your help up front.


回答1:


This issue was fixed by the developer (https://github.com/erusev/parsedown-extra/issues/18), I've created a pull request for it https://github.com/getkirby/kirby/pull/132



来源:https://stackoverflow.com/questions/26672935/kirby-markdownextra-doesnt-produce-wanted-paragraphes-renders-line-breaks-ins

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