question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it working right now?

See original GitHub issue

I added it to a Vue 3 project and the output I am getting is this(Attached a screenshot below). Even with specifically setting the language to js.

Dependency Versions

Installation

import hljs from 'highlight.js/lib/core';
import javascript from 'highlight.js/lib/languages/javascript';
import hljsVuePlugin from "@highlightjs/vue-plugin";
hljs.registerLanguage('javascript', javascript);

 app.use(hljsVuePlugin)

Usage: Step 1

<template>
       <highlightjs
        language="js"
        code="function chipPaginate(page) {
    if (typeof sortOrderNew === 'undefined')
        var sortOrder = 3;

    if (typeof sortOrderNew !== 'undefined')
        var sortOrder = sortOrderNew;

    console.log(sortOrder);
}
"
    />
</template>

Usage: Step 2

<script>
  components: {
        "highlightjs": hljsVuePlugin.component
  },
</script>

Output

Screenshot 2021-10-09 at 1 13 31 AM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Trinovantescommented, Oct 8, 2021

Can you provide a repo?

edit: I suspect you’re not importing a theme CSS e.g. import 'highlight.js/styles/stackoverflow-light.css'

0reactions
arneeshcommented, Oct 8, 2021

Ah, yes that was the issue. Thanks for the help I appreciate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is It Down Right Now? Website Down or Not?
"Is It Down Right Now" monitors the status of your favorite web sites and checks whether they are down or not. Check a...
Read more >
Downdetector
Real-time problem & outage monitoring​​ We tell you when your favorite services are down or having problems.
Read more >
Is it down? Check at Down for Everyone or Just Me
Check if a website or service is down or having problems. Click now to check!
Read more >
Support - System Status - Apple
Looking for developer system status? Find it hereDeveloper system status - find it here.. Last updated today, 9:00 PM Pacific Standard Time.
Read more >
Online Services - Activision Support
Stay Connected! For any outages, we'll let you know as soon as services are back online. Experiencing an outage?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found