trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.
https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_
MIT License
2.61k stars 674 forks source link

interactive docs: backspacing at line 1 char 0 causes an issue with our `export {/*magic*/};\n` hack #4294

Open davidmurdoch opened 1 year ago

davidmurdoch commented 1 year ago

You'll have to try it to figure out what I mean.

We prepend export {/*magic*/} to each editor's code so the typechecker doesn't think the code is global and shared between editors. We then hide that first line from the editor... but it can still be reached by backspacing to it, which causes the code samples to fail.