0

I want to have multiple lines of text appear in one cell (one row and one column).

In Vimwiki it looks adequate. However, when I convert Vimwiki to HTML, each sentence gets its own row. So I know I am not getting it right, but I have not yet been able to figure out what I am missing.

MWE

This vimwiki text

= Test =

Regular Text

    Blockquote

| Special Table               |
|-----------------------------|
| First Sentence              |
| Second Sentence, same cell. |
| Third Sentence, same cell.  |
|                             |
|                             |  

Regular text

produces this HTML:

<p>
Regular Text
</p>
<blockquote>
Blockquote
</blockquote>

<table>
<tr>
<th>
Special Table
</th>
</tr>
<tr>
<td>
First Sentence
</td>
</tr>
<tr>
<td>
Second Sentence, same cell.
</td>
</tr>
<tr>
<td>
Third Sentence, same cell.
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
</tr>
</table>

<p>
Regular text
</p>

</body>
</html>

I want HTML to look like this:

<p>
Regular Text
</p>
<blockquote>
Blockquote
</blockquote>

<table>
<tr>
<th>
Special Table
</th>
</tr>
<tr>
<td>
First Sentence<br>
Second Sentence, same cell.<br>
Third Sentence, same cell.<br>
&nbsp;
&nbsp;
</td>
</tr>
</table>

<p>
Regular text
</p>

</body>
</html>

I have read the help pages:

If you set > in a cell, the cell spans the left column.
If you set \/ in a cell, the cell spans the above row

I have not been able to use those details to produce the output I want.

How do I tell Vimwiki to put all of those lines of text into one single table cell?

1

The vimwiki syntax does not support what you want.

When you use > or \/ you are giving the left/above column more space but the text has to be written there and may not span multiple lines.

You could ask for this feature on GitHub.

1

I added the functionality I wanted to vimwiki and submitted a pull request to get it incorporated into the main body of code.

In the process of doing this, I realized I can accomplish my larger goal using blockquote and CSS that vimwiki also currently provides.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.