jsweet
jsweet copied to clipboard
Indentation in comments is lost in transpilation
Indentation in comments is lost in transpilation. JavaDocs often contain indented HTML or they can have code samples where the indentation is preferable to preserve.
To reproduce:
Transpile the following Java class to TypeScript:
/**
* <ul>
* <li>Hello
* <li>World
* </ul>
*/
public class Foo {}
Actual result:
/* Generated from Java with JSweet 2.2.0-SNAPSHOT - http://www.jsweet.org */
/**
* <ul>
* <li>Hello
* <li>World
* </ul>
* @class
*/
class Foo {}
Foo["__class"] = "Foo";
Expected result:
/* Generated from Java with JSweet 2.2.0-SNAPSHOT - http://www.jsweet.org */
/**
* <ul>
* <li>Hello
* <li>World
* </ul>
* @class
*/
class Foo {}
Foo["__class"] = "Foo";
JSweet version used: http://www.jsweet.org/jsweet-live-sandbox/
Thanks for reporting.
Do you want to take a look and submit PR?