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

Allow simplified input for attribute values #943

Closed
MrSpoocy opened this issue Oct 25, 2022 · 2 comments · Fixed by #945
Closed

Allow simplified input for attribute values #943

MrSpoocy opened this issue Oct 25, 2022 · 2 comments · Fixed by #945
Labels
bug Something isn't working right

Comments

@MrSpoocy
Copy link
Contributor

Description

Related to the https://commonmark.thephpleague.com/2.3/extensions/attributes/ extension, I would like to make an adjustment. In order to make it easier for the users, I would be a bit more generous when entering values for atttributes (can be activated via configuration).

For all key-value values, where the value only consists of the following characters A-Za-z0-9-_. the user does not need to write quotation marks (they are set in the HTML anyway).

It is only an improvement for the operability. What is your opinion?
I would make this adjustment as part of the change in #942.

Example

[Goolge can help you](https://www.google.de){target=_blank} -> <a href="https://www.google.de" target="_blank">Goolge can help you</a>

### Headline {class=big} -> <h3 class="big">Headline</h3>

Total crazy{class=cms.highlight} -> <p class="cms.highlight">Total crazy</p>

Did this project help you today? Did it make you happy in any way?

No response

@MrSpoocy MrSpoocy added the enhancement New functionality or behavior label Oct 25, 2022
@colinodell
Copy link
Member

Looking at one of our test cases it seems like this might already be supported:

h | h
----------|---
{.head} c1 |{.head} c2
{summary="Table summary" .class1 style="color:red" border=3 width="50%" frame=lhs rules=cols cellspacing=2em cellpadding=4px}

Would you be open to adding some more test cases to confirm whether this works as expected? We can then commit those new test cases if they pass or explore options (like your proposal) if they don't currently work.

@colinodell colinodell added this to the v2.4 milestone Oct 25, 2022
@MrSpoocy
Copy link
Contributor Author

Then maybe it's a bug I found. I will extend the tests tomorrow morning. What I can already say, with me the following did not go (the point at the end provides for problems):

This is
a test [Google](https://www.google.de){target=_blank}.

Second line

@colinodell colinodell linked a pull request Oct 30, 2022 that will close this issue
@colinodell colinodell removed this from the v2.4 milestone Oct 30, 2022
@colinodell colinodell added bug Something isn't working right and removed enhancement New functionality or behavior labels Oct 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants