Skip to content

x-component does not work with parameters that contain uppercase letters #195

@nodesiremonk

Description

@nodesiremonk

It seems the parseParams() function only match lowercases (a-z). So any camelCase keys are not working correctly. e.g.

<x-componet one="value1" twoWord="value2">slot</x-component> only pass $one (not $twoWord) to the component.

Is it possible to include A-Z in the preg_match_all() function to make it work with keys containing uppercase letters?

protected function parseParams($params): string
{
    preg_match_all('/([a-z-0-9:]*?)\s*?=\s*?(.+?)(\s|$)/ms', $params, $matches);
    // ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions