highlightjs / highlight.js

JavaScript syntax highlighter with language auto-detection and zero dependencies.
https://highlightjs.org/
BSD 3-Clause "New" or "Revised" License
23.52k stars 3.57k forks source link

[Request] Add Support For VueJS Single File Component Highlight Syntax #3785

Closed JenuelDev closed 6 months ago

JenuelDev commented 1 year ago

Is your request related to a specific problem you're having? Currently, after looking at the supported language I have not found vuejs.

The solution you'd prefer / feature you'd like to see added... It would be awesome if there is a highlight support for vuejs codes as well. like:

<script setup>
import { ref } from 'vue'
import PageOne from "./PageOne.vue"
import PageTwo from "./PageTwo.vue"
import PageThree from "./PageThree.vue"

const selectedPage = ref("three");
</script>

<template>
  <h1>This Are Pages</h1>

  <button @click="selectedPage = 'one'">
    Select Page One
  </button>
  <button @click="selectedPage = 'two'">
    Select Page Two
  </button>
  <button @click="selectedPage = 'three'">
    Select Page Three
  </button>

  <PageOne v-if="selectedPage == 'one'" />
  <PageTwo v-if="selectedPage == 'two'" />
  <PageThree v-if="selectedPage == 'three'"/>
</template>

Any alternative solutions you considered... Currently there are no good alternatives.

Additional context... You might get some idea on this https://github.com/vuejs/vue-syntax-highlight

joshgoebel commented 6 months ago

Please see our request policy:

https://highlightjs.readthedocs.io/en/latest/language-requests.html