Skip to content

Vue: uppercase tag for custom component <Table> is converted to lowercase <table> #5524

@cypressious

Description

@cypressious

I have a custom component called Table installed globally using Vue.component('Table', Table). This means, that in a template, Table and table are not the same. However, prettier converts the uppercase variant to the lowercase one.

Prettier 1.15.2
Playground link

--parser vue

Input:

<template>
  <Table></Table>
</template>

<script>
</script>

<style>
</style>

Output:

<template>
  <table></table>
</template>

<script></script>

<style></style>

Expected behavior:

Leave uppercase <Table> untouched.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:vueIssues affecting Vuelocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions