Skip to content

Issue: Syntax Highlighting Not Working for Vue Code in Code Blocks #409

@amitksingh1490

Description

@amitksingh1490

Description:
Syntax highlighting for Vue code is not functioning correctly in code blocks. When using the Vue language tag (vue) in a code block, the syntax highlighting does not render as expected. Below is an example:

```vue
<script setup lang="ts">
import { useQuery } from "@urql/vue";
import { ref, computed } from "vue";

const postsQuery = `
  query GetPosts($limit: Int!, $offset: Int!) {
    posts(limit: $limit, offset: $offset) {
      id
      title
    }
  }
`;

const limit = ref(10);
const offset = ref(0);

const { data, fetching, error } = useQuery({
  query: postsQuery,
  variables: computed(() => ({
    limit: limit.value,
    offset: offset.value,
  })),
});

const loadMore = () => {
  offset.value += limit.value;
};
</script>

Expected Behavior:
The code should display with proper syntax highlighting for Vue components, including script, template, and style sections.

Actual Behavior:
The code does not display with the expected syntax highlighting, making it harder to read and understand.

Screenshot
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions