server icon indicating copy to clipboard operation
server copied to clipboard

Code blocks not rendering properly on back of cards

Open cjappl opened this issue 1 year ago • 2 comments

Describe the bug When using the code block feature in notion, by putting code in block with triple tick marks, this code is poorly formatted on the Anki cards

To Reproduce Steps to reproduce the behavior:

  1. Write a page with a code block, or a link to a code block Screenshot 2024-03-24 at 10 57 43 AM
  2. Export page as HTML
  3. Use 2Anki with default settings

Expected behavior Code blocks are formatted as they are on the page (bonus points if syntax is highlighted

Observed behavior Code is lacking any newlines, spaces, tabs, leaves all code in one line "blob" Screenshot 2024-03-24 at 10 59 08 AM Screenshot 2024-03-24 at 10 58 57 AM

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Firefox
  • Version 124

cjappl avatar Mar 24 '24 18:03 cjappl

Have you changed any settings? Did you try with and without Preserve Newlines in the Toggle Header and Body? Screenshot 2024-04-03 at 6 40 04 PM

aalemayhu avatar Apr 03 '24 16:04 aalemayhu

The only settings I tweak are the "ignore the 🥑" and the deck name.

Here are the settings I've been using:

Screenshot 2024-04-03 at 9 44 59 AM Screenshot 2024-04-03 at 9 44 54 AM Screenshot 2024-04-03 at 9 45 03 AM Screenshot 2024-04-03 at 9 45 06 AM

cjappl avatar Apr 03 '24 16:04 cjappl