Skip to content

Mustache templates produce irregular whitespace #149844

@evelez7

Description

@evelez7

Mustache templates produce irregular whitespace in Clang-Doc HTML templates causing tags to be misaligned sometimes. This only seems to happen when a partial is invoked and it is not at the beginning of the line.

Take a partial that is declared at the beginning of the line, but nested within HTML tags. This produces expected whitespace, but the contents of the partial are not indented relative to the rest of the file.

        <div>
{{Partial}}
        <div>

If the partial is indented to try to match the indentation of the tags, such as:

        <div>
            {{Partial}}
        </div>

then the rendered HTML looks something like:

        <div>
// rendered content
                            <div>

From my testing, it is only the immediately proceeding tag that is affected.

@ilovepi

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions