deathau / markdownload

A Firefox and Google Chrome extension to clip websites and download them into a readable markdown file.
Apache License 2.0
2.91k stars 226 forks source link

HTML DIV and SPN tags in selected code blocks from chatgpt #278

Open amariusz opened 11 months ago

amariusz commented 11 months ago

About two weeks ago I've noticed a change while using markdownload on chatgpt site (chat.openai.com). I assume chatgpt site has changed.

Previously while selecting a query and response with codeblock the output produced was not perfect, but usable. For example:

You

Create snippet for bash loop without explanation.

ChatGPT

ChatGPT

bashCopy #!/bin/bash

for i in {1..5}
do
  echo "Iteration $i"
  # Your commands or actions here
done

Currently it's not useful at all

You

Create snippet for bash loop without explanation.

ChatGPT

<div class="bg-black rounded-md"><div class="flex items-center relative text-gray-200 bg-gray-800 dark:bg-token-surface-primary px-4 py-2 text-xs font-sans justify-between rounded-t-md"><span>bash</span><button class="flex gap-1 items-center">Copy code</button></div><div class="p-4 overflow-y-auto"><code class="!whitespace-pre hljs language-bash"><span class="hljs-meta">#!/bin/bash</span>

<span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> {1..5}
<span class="hljs-keyword">do</span>
  <span class="hljs-built_in">echo</span> <span class="hljs-string">"Iteration <span class="hljs-variable">$i</span>"</span>
  <span class="hljs-comment"># Your commands or actions here</span>
<span class="hljs-keyword">done</span>
</code></div></div>

Is there some setting that affects this behaviour?

There's ChatGPT to Markdown which produces best result but ignores selection (works on whole page as far as I know).

Thanks