Seems unable to convert <pre class="EnlighterJSRAW"> </pre>to Markdown code block
See original GitHub issueHi, 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:
- Created 3 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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
pre
s as code blocks but for some reason loses all the indentation. Not sure why, and it doesn’t happen on other pages I tested.