Skip to content

Can't parse classes with : or ! #224

@zachahn

Description

@zachahn

Happy new year!

I'm using the "try Textile" form, so the issue template doesn't quite apply. Apologies in advance if I've miscategorized this! I'm assuming that the form is using this PHP version.

I was originally thinking about raising this issue in the spec repo, but after looking around a bit, this repo seemed to be the canonical Textile implementation.

Problematic Textile markup

p(md:mt-3). hello

p(!mt-3). there

Expected output

<p class="md:mt-3">hello</p>

<p class="!mt-3">there</p>

Actual output

<p>hello</p>

<p>there</p>

Additional information

I'm hoping to use Textile with Tailwind CSS. The two main incompatibilities I see are the characters : and !.

Looking a little deeper, I do see some other characters which are valid Tailwind classes but invalid Textile classes, but I only see them in the context around workarounds. I only use Tailwind in my hobby projects, so I'm far from an authority, but this makes me think that it's not as important to support them—but I'll list what I've found for completeness: ', (, ), &, /, \, and #.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions