Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improvement: markdown shortcuts #1398

Merged
merged 2 commits into from
May 17, 2024
Merged

improvement: markdown shortcuts #1398

merged 2 commits into from
May 17, 2024

Conversation

mscolnick
Copy link
Contributor

@mscolnick mscolnick commented May 17, 2024

Adds a few markdown shortcuts

Bold (Mod-b)
Italic (Mod-i)
Convert to Link (Mod-k)
Convert to Ordered list (Mod-Shift-7)
Convert to Unordered list (Mod-Shift-8)
Convert to Blockquote (Mod-Shift-9)
Convert to Code (Mod-Shift-0)

Also improves pasting with a URL when selected and wrapping with a tick (`)

Copy link

vercel bot commented May 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 2:00pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 2:00pm

Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels great!

Found a couple bugs though.

  1. I'm unable to copy paste URLs into the markdown editor (nothing happens). Pasting non urls still works.

  2. I really like the "to code" shortcut. For fenced blocks (triple ticks), can we add a newline at the beginning and end of the block?

For example, starting from

def foo():
  ...

Instead of

```def foo():
...```

the shortcut should yield

```
def foo():
...
```

@mscolnick mscolnick merged commit 8799dee into main May 17, 2024
28 of 29 checks passed
@mscolnick mscolnick deleted the ms/markdown-short-cuts branch May 17, 2024 16:55
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.6.1-dev1

mscolnick added a commit that referenced this pull request May 20, 2024
* improvement: markdown shortcuts

* fixes and more tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants