Markdown2Anki icon indicating copy to clipboard operation
Markdown2Anki copied to clipboard

UI/UX: Add newlines to code blocks

Open Mochitto opened this issue 2 years ago • 1 comments

As of now, code blocks use display: block on the spans that represent a line. This means that when you are copying from the code-block, the text will not have newlines, returning the code as a single line.

Possible solutions:

  1. Using a block element instead of spans. This could be recognized as a block that has a newline after it when copying.
  2. Adding invisible <br>. Those should be recognized as newlines when copying.

Mochitto avatar May 17 '23 09:05 Mochitto

Suggestion. Using white-space: pre-wrap; on the code-block should solve this!

t1enneRT avatar Nov 03 '23 16:11 t1enneRT