Skip to content

Special Tags have parsing issues when closed with <tag /> instead of <tag></tag> #1099

@crphang

Description

@crphang

Tell us about your environment
Latest Master

  • MarkBind Version:
    2.11.0
    What did you do? Please include the actual source code causing the issue.

For any plugin, register a special tag:

getSpecialTags: () => ['testtag'],

In any markbind document, we could write normally as:

<testtag />

<testtag>
Some document
</testtag>

What did you expect to happen?

When running markbind build: The produced result remain as:

<testtag />

<testtag>
Some document
</testtag>

regardless of whether it is a special tag.

What actually happened? Please include the actual, raw output.

The second testtag's closing bracket is removed, leading to some parsing error downstream from cheerio.

image

** More examples **

See #1100:
In the case of using puml as a special tag, existing usages of having:

<puml src="a.puml" />

<puml src="b.puml" />

<puml src="c.puml" />

would not work as only the other puml tags will not be parsed accordingly from cheerio.

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