How can I make table cell span multiple lines in MultiMarkdown?

做~自己de王妃 提交于 2019-12-11 08:49:06

问题


I'm using Text::MultiMarkdown to print from Perl to HTML.

I would like to create a table where some of the cells contain a few strings, each in a separate line within the cell (see "four five six" in the picture below).

Can I do that?


回答1:


Text::MultiMarkdown passes some HTML straight through so you can use <br> tags:

print Text::MultiMarkdown::markdown(q{
Header 1 | Header 2
-------- | ---------------------------
One line | First line<br />Second line
});

It produces a table body like this:

<tr>
    <td>One line</td>
    <td>First line<br />Second line</td>
</tr>

Which seems to be what you're looking for.



来源:https://stackoverflow.com/questions/3978764/how-can-i-make-table-cell-span-multiple-lines-in-multimarkdown

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