Formatting lines of code alter's the last line

Steps to reproduce

Starting from scratch, what are the steps to make the bug happen? The fewer the steps, the better.

  1. Paste in the following code (it’s 3 levels down or so)

var f1 = function() {
    var x = "inside f1";
// → outside

var f2 = function() {
    x = "inside f2";
// → inside f2
  1. Highlight the code and then press `ctrl+``

Expected result

What do you expect to see after carrying out the steps above?

It should format everything without replacing anything.

Actual result

Instead of the expected result, what happened?

It replaces the last line with the second to last line.


Which operating system are you using? Which browser are you using? If you’re using a desktop or mobile app, what’s the version number of Dynalist?


1 Like

I can reproduce this bug… really weird. Will look into it!

1 Like

It also breaks for other formatting shortcuts like Ctrl+B and Ctrl+I. Will fix those as well!

1 Like