如何在 MultiMarkdown 中使表格单元格跨多行?

发布于 2024-09-28 14:50:38 字数 284 浏览 8 评论 0原文

我正在使用 Text::MultiMarkdown 从 Perl 打印到 HTML。

我想创建一个表格,其中某些单元格包含一些字符串,每个字符串都在单元格内的单独行中(请参见下图中的“四五六”)。sample table

我可以这样做吗?

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).sample table

Can I do that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜是你 2024-10-05 14:50:38

Text::MultiMarkdown 直接传递一些 HTML,因此您可以使用
标签:

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

它会生成如下所示的表格主体:

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

这似乎就是您正在寻找的内容。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文