Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom class breaks html tag #9

Closed
juliawarnke opened this issue Jul 27, 2021 · 1 comment · Fixed by #12
Closed

Custom class breaks html tag #9

juliawarnke opened this issue Jul 27, 2021 · 1 comment · Fixed by #12
Assignees
Labels
bug Something isn't working

Comments

@juliawarnke
Copy link
Member

juliawarnke commented Jul 27, 2021

the pre-tag will be torn apart like this, when adding custom classes to pre and p:

Bildschirmfoto 2021-07-27 um 09 59 31

How it should look like:
Bildschirmfoto 2021-07-27 um 10 04 36

Markdown config:
'styles' => [ 'default' => [ 'pre' => 'border overflow-auto p-3', 'p' => 'mb-4', ], ],

@juliawarnke juliawarnke added the bug Something isn't working label Jul 27, 2021
@juliawarnke juliawarnke changed the title Custom classes break output Custom class breaks html tag Jul 27, 2021
@jonassiewertsen
Copy link
Contributor

jonassiewertsen commented Jul 27, 2021

Good catch!

It's related, as we don't check for any allowed characters after the tag-name.

Right now, the class replacement does work via a simple str_replace. It will be solved, by using a stable regex expression, as this is needed to resolve #10 as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants