umijs / sylvanas

Convert TypeScript to JavaScript
45 stars 4 forks source link

bug: missing newlines after tsx -> jsx #12

Closed PeachScript closed 4 years ago

PeachScript commented 4 years ago

Versions

0.4.4

Reproduce example

使用 parseText 转换如下代码:

import React from 'react';
import katex from 'katex';

export default () => <h1>Hello {typeof katex}!</h1>;

将会得到:

import React from 'react';
import katex from 'katex';
export default () => <h1>Hello {typeof katex}!</h1>;

换行被干掉了,会导致项目的测试用例挂掉,而 lock 到 sylvanas@0.4.3 是正常的;关键现在 master 分支还是 0.4.30.4.4 的代码去哪里了…

PeachScript commented 4 years ago

v0.6.0 已修复