2

我有一张看起来像的桌子

====================    =======
Name1                   Info1
Name2                   Info2
Slightly longer name    Info3
Name4                   Info4
====================    =======

rst2html坚持使用以下宽度规范创建 HTML 表格:

<colgroup>
<col width="39%" />
<col width="61%" />
</colgroup>

然后,这会使第Slightly longer name1 列中的内容换行成两行。

我怎样才能停止rst2html这样做?

4

2 回答 2

1

不是一个很好的解决方案,但只是过滤掉这些行怎么样:

rst2html.py file.rst | egrep -v '(colgroup|col width)' > file.html
于 2013-06-09T21:19:29.737 回答
0

我在https://sourceforge.net/p/docutils/feature-requests/39/为此创建了一个功能请求

于 2014-11-06T10:04:13.473 回答