Commit 03dd298
feat(note-block): add single newline support in preview
Add a preprocessor function that converts single newlines to markdown
hard breaks (two trailing spaces + newline) before rendering. This
ensures that when users press Enter in the note block editor, the
line break shows up in the preview.
The function preserves:
- Double newlines (paragraph breaks)
- Code block formatting (fenced and inline)
Co-authored-by: Emir Karabeg <emir-karabeg@users.noreply.github.com>1 parent 7898f03 commit 03dd298
File tree
1 file changed
+34
-1
lines changed- apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block
1 file changed
+34
-1
lines changedLines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
302 | 333 | | |
303 | 334 | | |
304 | 335 | | |
305 | 336 | | |
| 337 | + | |
| 338 | + | |
306 | 339 | | |
307 | 340 | | |
308 | 341 | | |
| |||
468 | 501 | | |
469 | 502 | | |
470 | 503 | | |
471 | | - | |
| 504 | + | |
472 | 505 | | |
473 | 506 | | |
474 | 507 | | |
| |||
0 commit comments