dfinity / prettier-plugin-motoko

A code formatter for the Motoko smart contract language.
Apache License 2.0
28 stars 1 forks source link

bug: using a quote in a comment breaks formatting #48

Closed peterpeterparker closed 2 years ago

peterpeterparker commented 2 years ago

Issue

While adding following comment to one of my canister, I noticed that the auto formatting was breaking - was generating an incorrect format for my code.

/**
 * Does a bucket id exists? - i.e. not a bucket for a user but is a canister id linked to any user's bucket? 
 */

After debugging I noticed that the root cause was using a quote ' in the comment. i.e. if I remove the quote, format is generated correctly.

rvanasa commented 2 years ago

Fixed in v0.1.6. Cheers!