n8n-io / n8n

Free and source-available fair-code licensed workflow automation tool. Easily automate tasks across different services.
https://n8n.io
Other
46.33k stars 6.59k forks source link

Sticky notes doesn't support code blocks #10978

Open bastianfbr opened 2 days ago

bastianfbr commented 2 days ago

Bug Description

I was working on a great workflows with some comments and thought about giving some code notes with sticky notes in Markdown. I just added some code with the md syntax.

The thing is code should be formatted as a code block according to https://commonmark.org/help/ and https://markdown-it.github.io/ (the package that n8n use for sticky notes) but the preview is just made of many inline codes :

(Note that i just write some dumb code for example) image

To Reproduce

  1. Create a workflow
  2. Add the sticky note :
    
    "meta": {
    "instanceId": "3bfec22f89ad299b5b96495128d71a8acbefb4ac174fd94ab6adbe4a78e34db3"
    },
    "nodes": [
    {
      "parameters": {
        "content": "## ERRORS\n\n```\nif (true === true) {\n   return false;\n}\n```",
        "height": 289,
        "width": 442,
        "color": 3
      },
      "id": "3ac5aa86-52a4-48f7-89bc-bcd72415b55b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        620,
        520
      ]
    }
    ],
    "connections": {},
    "pinData": {}
    }```

Expected behavior

Preview should be a large code block like :

image

Operating System

Windows 11

n8n Version

1.57.0

Node.js Version

18

Database

SQLite (default)

Execution mode

main (default)

Joffcom commented 2 days ago

Hey @bastianfbr,

We have created an internal ticket to look into this which we will be tracking as "GHC-257"