feat: auto transform code blocks

This PR will allow you to write code blocks. There are two ways to do so:

  1. Use 4 spaces
  2. Use 3 backticks (```) (you can also mention the programming language after the backticks, but TextEdit does not support syntax highlighting when used with MarkdownText).

Behavior

  • To exit from a code block, just press return twice. To stay in the block when creating a new line, hold SHIFT.
  • Tab will insert 4 spaces
  • Backtab will remove the first 4 spaces of the line
  • On pressing enter (without SHIFT), it will use the same indent level as the previous line
Edited by Prayag Jain

Merge request reports

Loading