prettier-plugin-motoko icon indicating copy to clipboard operation
prettier-plugin-motoko copied to clipboard

There should be a space between comment marker and comment

Open f0i opened this issue 3 years ago • 1 comments

After a comment marker (//) at least one space should be inserted to improve readability. Additional spaces should be preserved.

Examples:

  • //some comment would be formatted as // some comment

// module {
//   asdf;
//}

would be formatted as

// module {          <- keep one space
//   asdf;           <- keep multiple spaces
// }                 <- add one space

f0i avatar Oct 03 '22 09:10 f0i

Great suggestion! I'm currently trying to maintain consistency with the Prettier ecosystem (https://github.com/prettier/prettier/issues/5755), although it seems totally reasonable to have this as an optional feature.

rvanasa avatar Oct 03 '22 15:10 rvanasa