在markdown中创建没有标题的表 [英] Create table without header in markdown

查看:161
本文介绍了在markdown中创建没有标题的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在markdown中创建没有标题的表?

Is it possible to create a table without a header in markdown?

HTML将如下所示:

The HTML would look like this:

<table>
<tr>
    <td>Key 1</td>
    <td>Value 1</td>
</tr>
<tr>
    <td>Key 2</td>
    <td>Value 2</td>
</tr>
</table>


推荐答案

大多数降价解析器不支持没有标题的表。这意味着标题的分隔线是强制性的。

Most markdown parsers don't support tables without headers. That means the separation line for headers is mandatory.

  • multimarkdown
  • Maruku: A popular implementation in ruby
  • byword: "All tables must begin with one or more rows of headers"
  • PHP Markdown Extra "second line contains a mandatory separator line between the headers and the content"

RDiscount 使用PHP Markdown Extra语法。

  • Kramdown: A parser in Ruby
  • Text::MultiMarkdown: Perl CPAN module.
  • MultiMarkdown: Windows application.
  • ParseDown Extra: A parser in PHP.
  • Pandoc: A document converter for the command line written in Haskell (supports header-less tables via its simple_tables and multiline_tables extensions)

如果您能够更改HTML输出的CSS,您可以如何曾经利用:empty 伪类来隐藏空标题并使其看起来根本没有标题。

If you're able to change the CSS of the HTML output you can however leverage the :empty pseudo class to hide an empty header and make it look like there is no header at all.

这篇关于在markdown中创建没有标题的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆