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.

Seems unable to convert <pre class="EnlighterJSRAW"> </pre>to Markdown code block

See original GitHub issue

Hi, thanks for this amazing tool.

I was trying to convert this page to Markdown, and I was using markdownload on Brave browser (version 1.21.77, Chromium: 89.0.4389.90 ) on mac (Macbook pro 2020).

Everything worked fine, but the content inside <pre class="EnlighterJSRAW"> and </pre> turns out to be plain text, which should be code block base on the website appearance.

I didn’t see any setting option related to this situation, so I thought maybe creating an issue would be helpful. Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
deathaucommented, Feb 12, 2022

There’s some more fixes and stuff I want to get to next week. I hope to push out a new release towards the end of the week.

1reaction
deathaucommented, Feb 8, 2022

I’ve added some support to parse pre elements as code blocks now, and if it’s got the same classes as GitHub it will put in the language for syntax highlighting, too. Because of all the different syntax highlighting libraries out there, I’m only supporting GitHub for now, but I might add more later.

Some caveats: @A-Tan5 — for some reason, in the link you provided, the extension will output some unfenced code, followed by the correctly fenced code. This is to do with the way the syntax highlighter is outputting everything on that page not being able to be parsed easily by Readability, I think. But there’s also a hidden pre that works great, so there is fenced code as well.

@christophberger — the page you linked to will parse the pres as code blocks but for some reason loses all the indentation. Not sure why, and it doesn’t happen on other pages I tested.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extended Syntax - Markdown Guide
The basic Markdown syntax allows you to create code blocks by indenting lines by four spaces or one tab. If you find that...
Read more >
question: how to enable code blocks · Issue #538 - GitHub
I am unable to see code blocks: Compared to the demo (http://demo.showdownjs.com/): How to reproduce: npm i showdown Run node convert.js, ...
Read more >
How do I add Markdown formatting in a code / pre block?
He was not asking how to add a code block, he was asking how to format text within the code block (in this...
Read more >
Markdown Syntax Documentation - Daring Fireball
Pre -formatted code blocks are used for writing about programming or markup source code. Rather than forming normal paragraphs, the lines of a...
Read more >
Markdown Syntax | Hub - JetBrains
Markdown Syntax . Last modified: 11 November 2022. In different locations around Hub, you have the ability to format blocks of text. This...
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