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.

Syntax highlighting on windows

See original GitHub issue

Referring back to #7, we ended up disabling syntax highlighting on Windows. This was a bi-product of correcting some exceptions.

It’s still not clear why syntax highlighting is no longer working on Windows. If someone could track it down, it would be great!

How syntax highlighting works

We use hljs (highlight.js) which we include in all the code which is pushed into PhantomJS (headless browser). This should action syntax highlighting and it does in the debug HTML output, however for some reason under PhantomJS it’s not rendering out the highlights in the final PDF save.

PhantomJS is a headless browser wrapped into a node module, it’s used within the html-pdf package we use. It enables us to kick up a browser, push in the html, and get a PDF out afterwards as well as having some header and footer support we make use of.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
IonicaBizaucommented, Jun 28, 2017

@BlueHatbRit Hey! I’m really happy to see you’re using showdown-emoji which I have just open-sourced and published it (it was on npm for a while but it wasn’t on GitHub).

Also, I open-sourced showdown-highlight which uses highlight.js.

I think that will help since it will generate the highlighting on the server, not on the client. Once added, showdown-highlight will convert the code blocks (pre) into highlighted code blocks. That means we still need the highlight.js CSS, but not the JavaScript on the client.

I don’t have a Windows machine around…

Keep up the good work! 👍

0reactions
BlueHatbRitcommented, Jan 19, 2019

This should be resolved with the 2.0.0 Puppeteer based release but please check the release notes before upgrading!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Syntax Highlight Guide | Visual Studio Code Extension API
Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords...
Read more >
Syntax Highlighting in Windows Forms Syntax Editor
Provides built-in syntax highlighting support for popular languages like C#, VB.NET, XML, HTML, Java, SQL, PowerShell, C, JavaScript, VBScript, and Delphi.
Read more >
Implementing Syntax Coloring - Visual Studio (Windows)
To find out more about the new way to implement syntax coloring, see Walkthrough: Highlighting Text. We recommend that you begin to use...
Read more >
Download Syntax Highlighting - Best Software & Apps - Softonic
Download Syntax Highlighting . Free and safe download. Download the latest version of the top software, games, programs and apps in 2022.
Read more >
Install a Syntax Highlighter - Run Jekyll on Windows
By default, Jekyll comes with pygments.rb, which is a syntax highlighter based on Python. To use it on Windows, you'll need to install...
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