Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lately copies the literal html markup into the source code blocks #284

Open
pluraltouch opened this issue Jan 8, 2024 · 3 comments
Open

Comments

@pluraltouch
Copy link

pluraltouch commented Jan 8, 2024

I am using markdownload for a while, with no errors.

However lately it started to copy the literal html markup between the three backticked source code blocks.
I mean, if there is a code sample in the page the result is:

three backtick
literal html markup with spans, divs, etc copied here, instead of the pure code sample text
three backtick

I am using latest Chrome version 120.0.6099.199 (Official Build) (64-bit), markdownload 3.3.0 and using Chrome context menu Markdoenload -> Copy Selection as Markdown

@Laharah
Copy link

Laharah commented Jan 26, 2024

want to +1 this.

I've found that if you use the 4 space code block style instead of the backtick style, it works fine. It's annoying to have to convert them to backticks so you can get normal codeblocks that support language highlighting.

@KraXen72
Copy link

KraXen72 commented Mar 1, 2024

@Laharah
Copy link

Laharah commented Mar 1, 2024

same thing for this site: https://runjs.app/blog/equations-that-changed-the-world-rewritten-in-javascript

I checked out this site and looked at the HTML source. It looks like there actually is a <span> and color element between every letter of every codeblock. My theory is that this is some work-around so that code highlighting will work for people who have javascript blocked.

The code is still within a <code> tag, so I think it'd be possible to cut out the spans that are between every letter by changing how it's handled in the turndown.js file. I'd write a pull for it, but my javascript is shit.

So if anyone is game to fix this that'd be where I would start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants