Allow adding attributes without value#986
Allow adding attributes without value#986colinodell merged 5 commits intothephpleague:mainfrom svenluijten:attributes-without-values
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 |
|
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.