Skip to content

Numeric directive names produces invalid html tags #29

@oskargotte

Description

@oskargotte

Initial checklist

Affected package

[email protected]

Steps to reproduce

I use this package to parse md into jsx in a React app. If I parse the text The time is 12:00, I get a tag name 00 which, when rendered to the dom, throws the error Failed to execute 'createElement' on 'Document': The tag name provided ('00') is not a valid name.

Actual behavior

Prior to version 4, the :00 would not be recognized as a custom directive but with the introduction of #24 it is.

Expected behavior

Is it an error to allow directive names to start with numbers or is it to be expected and to be handled by the user of this package by escaping colons as necessary?

Runtime

No response

Package manager

No response

Operating system

No response

Build and bundle tools

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    👎 phase/noPost cannot or will not be acted on🙅 no/wontfixThis is not (enough of) an issue for this project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions