Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add "text/x-template" as type #176

Open
wants to merge 2 commits into
base: new
Choose a base branch
from
Open

add "text/x-template" as type #176

wants to merge 2 commits into from

Conversation

Drive4ik
Copy link

add "text/x-template" as type of script

<script type="x-template">

as suggested here https://vuejs.org/v2/api/#template

add "text/x-template" as type of script
```html
<script type="x-template">
```
as suggested here https://vuejs.org/v2/api/#template
@dmyers
Copy link

dmyers commented Apr 10, 2019

This would be great for us who us the template option.

Does this also match just the shorthand <script type="x-template"> or only <script type="text/x-template">? I can't tell in the PR right away.

Wonder if a maintainer might look at this and consider merging? From a quick cursory glance other people are looking for Vue syntax highlighting of these templates on Stack Overflow and other forums.

added missed `x-template` type
@Drive4ik
Copy link
Author

Drive4ik commented Sep 5, 2019

@dmyers I added missed x-template type. Now supports

<script type="x-template">

and

<script type="text/x-template">

@FichteFoll
Copy link

FichteFoll commented Oct 27, 2023

From reading up on it quickly, this seems not that relevant for an SFC .vue file, because the <script type="text/x-template"> syntax is supposed to be used in html files and thus would requre extending the default HTML syntax with one that recognizes this template syntax to then include the vue template syntax there. Additionally, you would have to use this extended syntax for your html files.

It can be done, but considering how using the x-templates feature is discouraged in the Vue 2 docs and I wasn't able to find a mention of it in the Vue 3 docs, I presume this is not all that relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants