Skip to content

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

Open

Description

@jwarchol

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.

Activity

  1. kernow commented on Mar 31, 2021

    @kernow
    Owner

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions