Commit 0bc245b
feat(note-block): note block preview newlines (#3127)
* feat(note-block): add single newline support in preview
Add remark-breaks plugin to the note block markdown renderer to convert
single newlines into line breaks. This fixes the issue where users had
to use double newlines (\n\n) to create visible line breaks in the
note block preview.
Co-authored-by: Emir Karabeg <emir-karabeg@users.noreply.github.com>
* Revert "feat(note-block): add single newline support in preview"
This reverts commit 049b425.
* 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>
* refactor(note-block): simplify comments
Co-authored-by: Emir Karabeg <emir-karabeg@users.noreply.github.com>
* added remark-breaks to allow single new line
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Emir Karabeg <emir-karabeg@users.noreply.github.com>
Co-authored-by: waleed <walif6@gmail.com>1 parent 0a08ac0 commit 0bc245b
File tree
3 files changed
+8
-1
lines changed- apps/sim
- app/workspace/[workspaceId]/w/[workflowId]/components/note-block
3 files changed
+8
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
305 | 306 | | |
306 | 307 | | |
307 | 308 | | |
308 | | - | |
| 309 | + | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments