Skip to content

AbstractNode.hasAttribute() doesn't take into account positional attributes #1734

@psea

Description

@psea

Hi!

For section

[attrVal="foo",attrPos]
== some section

hasAttribute() seems to returns false for positional ($positional) attributes.

section.hasAttribute("attrVal") // true
section.hasAttribute("attrPos") // false

Is that expected behavior?


section.getAttributes()

does have positional attributes returned.

{
  attrVal: "foo",
  "$positional": [null, "attrPos"]
}

Is it ok to rely on $positional property? Is it public facing property?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions