How to stop markdown table column wrap

I have an event schedule defined as follows:

|||
|-------------|----|
|10:00 - 10:30|Lorem ipsum dolor sit amet|
|10:30 - 11:00|Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.Excepteur sint occaecat cupidatat.|

The problem I am seeing is that the times wrap, i.e. instead of:
10:30 - 11:00
I am seeing:

10:30 - 
11:00

How do I keep the times on one line ?

You’ve got a couple of options.

Use non-breaking space

10:00 - 10:30

Use markdown attributes

config

[markup.goldmark.parser.attribute]
block = true # default is false
title = true # default is true

markdown

|||
|-------------|----|
|10:00 - 10:30|foo|
|10:30 - 11:00|bar|
{.no-wrap-col-1}

css

.no-wrap-col-1 td:nth-of-type(1) {
  white-space: nowrap;
}

Thanks for the swift reply @jmooring

Sadly  -  had zero effect.

So I’ll work on trying your second …

Works great. Try it:

git clone --single-branch -b hugo-forum-topic-51277 https://github.com/jmooring/hugo-testing hugo-forum-topic-51277
cd hugo-forum-topic-51277
hugo server
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.