Skip to content

Error in template-compilation example code #2754

@defcc

Description

@defcc

https://github.com/vuejs/vuejs.org/blob/05bb36f84a55237b6e2be503028d765f1f8c6392/src/v2/examples/vue-20-template-compilation/index.html#L56-L59

If there are two or more whitespace characters, the templateText value will be replaced incorrectly.

Maybe we need to remove the RegExp. Please let me know if I missed anything.

The error output is as bellow.

[Vue warn]: Error compiling template:

<div><header><h1>I'm a template!</h1></header><pv-if="message">{{ message }}</p><p v-else>No message.</p></div>

- v-else used on element <p> without corresponding v-if

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