Florent Georges
Florent Georges

Reputation: 2327

Unordered list in a table cell with Asciidoc

I am trying to have a (simple) unordered list in a table cell in an Asciidoc document. I use asciidoctor.

I tried the following:

|===
| One | Two

| Foo
|
- Bar
- Baz
|===

But this results in the last cell having simply the text - Bar - Baz as a simple string, no list formatting. I would like it to be formatted as a list, on two lines, with a bullet on each line. Any idea?

Upvotes: 8

Views: 4641

Answers (1)

Richard Smith
Richard Smith

Reputation: 49702

The default style of a table cell accepts only inline markup. To insert block elements you could change the cell style to "AsciiDoc". See this document for details.

For example:

|===
| One | Two

| Foo
a|
- Bar
- Baz
|===

Word of caution: The contents of the cell is treated as a separate AsciiDoc document, so certain markup (such as footnotes) behave badly as they no longer belong to the main document.

Upvotes: 12

Related Questions