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

Empty strings as an attribute value are returned as an empty array #57

Open
jwarchol opened this issue Mar 29, 2021 · 1 comment
Open

Comments

@jwarchol
Copy link

When [quote name=""]Body text[/quote] is parsed, @attributes[:name] is an empty array. Is this expected behavior? I'd have expected it to be an empty string, or maybe nil.

@kernow
Copy link
Owner

kernow commented Mar 31, 2021

@jwarchol I'm not sure there is a test for this particular input with an empty attribute value. I'm not actively working on this project at the moment but would be happy to merge in a PR and release a new version if you wanted to change the behaviour.

I think the sensible thing to return in this situation would be an empty string as you suggest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants