Posting Poetry in Discourse (Question)

I’ve considered the same issue for my forum. Poetry is not well supported by HTML, and not at all by markdown.

You can, however, create verses indented every second line by using markdown lists, and adding the CSS:

.cooked ul li {
    list-style-type: none;
}
.cooked ul li:nth-child(even) {
    text-indent: 1em;
}

Of course that means you can’t use unordered lists. You could limit this problem by specifying that indented verses are in a list inside a blockquote, i.e.

>- Here is a line, a poem that rhymes,
- and makes an odd kind of sense.
- Here is another, call it a brother,
- two siblings under one tent.

then use:

.cooked blockquote ul li {
    list-style-type: none;
}
.cooked blockquote ul li:nth-child(even) {
    text-indent: 1em;
}

Ideally you’d hack the markdown editor so that you could use a markup similar to an unordered list—say, begin each line with a tilde—and it would “cook” it appropriately. But that’s beyond me, I’m afraid.

Having said all that, the reality is that poets will want to format their verses in all kinds of weird and wonderful ways, and so they should! And the only way to do that is to mark up with preformatted text, and adjust the CSS.

2 Likes