rune-rs / rune

An embeddable dynamic programming language for Rust.
https://rune-rs.github.io
Apache License 2.0
1.7k stars 85 forks source link

Strange formatting on comment at end of block #743

Closed VorpalBlade closed 1 month ago

VorpalBlade commented 1 month ago

Given this rune code:

pub fn test(something, cmd) {
    if something {
        // A comment
        cmd.something();
        // TODO: Also add something else
    }
}

auto-formatting turns it into:

pub fn test(something, cmd) {
    if something {
        // A comment
        cmd.something();
    // TODO: Also add something else
    }
}

Note the strange de-indentation of the TODO comment.

Rune 0.13.3

udoprog commented 1 month ago

Fixed in #790