_From @iou90 on December 15, 2016 8:49_
Steps to Reproduce:
some React Native codes in index.ios.js:
import React, { Component } from 'react';
import {
AppRegistry,
Text,
View
} from 'react-native';
export default class Test extends Component {
render() {
return (
<View>
<Text>
¥
</Text>
<Text>
{'format is not working after ¥'}
</Text>
</View>
);
}
}
AppRegistry.registerComponent('Test', () => Test);
_Copied from original issue: Microsoft/vscode#17274_
Here's a reduce repo:
function render() {
return <View>
¥
</View>
}
function x(){}
Format document has no effect.
Replace ¥ with a, and the last line if now correctly formatted as:
function x() { }
Using the above example, I confirmed on the VSCode side that we receive an empty format response (no edits) from the TS server in the ¥ case:
[Trace - 3:06:07 PM] Sending request: format (28). Response expected: yes. Current queue length: 0
Arguments: {
"file": "/Users/matb/projects/sand/test.js",
"line": 1,
"offset": 1,
"endLine": 7,
"endOffset": 15
}
[Trace - 3:06:07 PM] Response received: format (28). Request took 4 ms. Success: true
Result: []
No longer seems to be happening in TS 3.0.1
Most helpful comment
No longer seems to be happening in TS 3.0.1