-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Allow adding attributes without value #986
Allow adding attributes without value #986
Conversation
Unfortunately the tests seem to fail as it is, probably because the regex is now too loose, causing a single functional test to fail; one that has to do with illegal whitespace in HTML. I'd appreciate some help to fix that if this is a feature you'd want included 🙂 |
Thanks for working on this! I left some pointers on your original proposal which should hopefully help here. |
Thanks for the pointers! I'll work them out later today. Meanwhile, do you want me to point this PR to |
Ah, yes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
FWIW, this is what I was working on when I thought I could use valueless attributes 🙂 |
This change will be available in the future 2.5.0 release. It may be a little while before that gets tagged, as I'm hoping to include some additional (unrelated) changes at the same time. |
Hello. This PR has unfortunately caused some issues for us. Apologies for commenting on an old PR, but this has only just been tagged today. I'm happy to try and open a PR to fix this myself, but I thought I'd mention it here first as you may understand the problem better. When we have templating language within our markdown string, previously the markdown parser would leave it alone. Now, it basically clears it out. For example: $converter->convert('# Hello {{ foo }}');
// Before: <h1>Hello {{ foo }}</h1>
// After: <h1>Hello {}</h1> We use the AttributesExtension. If I revert the |
As said in #985, this is my attempt at allowing valueless attributes to be set on elements.