Skip to content

Add custom extension for nowrap in columns #72

@markg85

Description

@markg85

Hi,

Right now if you want to do no text wrapping in a table you'd have to wrap your content in a span to do this. In bootstrap that would be like: <span class="text-nowrap">your content</span>

Or a full table example:

| Option | Description                                                               |
| ------ | ------------------------------------------------------------------------- |
| <span class="text-nowrap">aa</span>     | bla                                      |
| aa     | bla                                                                       |

Sparkling html in a - essentially - ascii formatted table is just ugly.

Now, sadly, markdown isn't consistent with itself as it already has no wrapping code blocks like this:

aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc aaa bbb ccc 

And other markdown renderers (not the github one) interpret a single exclamation mark as enabling word wrapping

```!
... some large single line content would wrap in some markdown renderers.
```

With that in mind, i propose we follow the exclamation (or bang) symbol:
! = wrapping. Let's consider this the "implicit default" because other renderers (like HedgeDoc) support this in fenced blocks.
!! = the inverse, so no wrapping.

I propose to add this on a column and a cell level. So some examples:

Cell level content wrapping

| Option | Description                                                               |
| ------ | ------------------------------------------------------------------------- |
|!! aa   | 11                                                                        |
| bb     |!! 22                                                                      |

Here the content of the columns aa and 22 would not be wrapped. bb and 11 would be wrapped.

Column level content wrapping

| Option | Description                                                               |
|!! ---- | ------------------------------------------------------------------------- |
| aa     | 11                                                                        |
| bb     | 22                                                                        |

Here the columns (that also arranges alignment like: :--, --: etc..) is modified. All the content in every column below the one that has !! (so aa and bb) should not be wrapped. The columns 11 and 22 are still wrapped.

Any thoughts on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions