Atom 1.12.6
The results of beautification are not what I expect.
This is what the code looked like before:
import React, {Component} from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableHighlight,
Navigator
} from 'react-native';
import {styles} from './src/style'
const routes = [
{
title: 'Kishar Nine',
index: 0
}, {
title: 'Counter',
index: 1
}
];
export default class kisharNine extends Component {
constructor(props) {
super(props);
}
render() {
return (
<Navigator
initialRoute={{ title: 'My Initial Scene', index: 0 }}
renderScene={(route, navigator) =>
<MyScene
title={route.title}
// Function to call when a new scene should be displayed
onForward={ () => {
const nextIndex = route.index + 1;
navigator.push({
title: 'Scene ' + nextIndex,
index: nextIndex,
});
}}
// Function to call to go back to the previous scene
onBack={() => {
if (route.index > 0) {
navigator.pop();
}
}}
/>
}
/>
);
}
}
AppRegistry.registerComponent('kisharNine', () => kisharNine);
The beautified code should have looked like this:
I expect all my code to be there. What happened to onBack!?
The beautified code actually looked like this:
import React, {Component} from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableHighlight,
Navigator
} from 'react-native';
import {styles} from './src/style'
const routes = [
{
title: 'Kishar Nine',
index: 0
}, {
title: 'Counter',
index: 1
}
];
export default class kisharNine extends Component {
constructor(props) {
super(props);
}
render() {
return (
<Navigator initialRoute={{
title: 'My Initial Scene',
index: 0
}} renderScene={(route, navigator) => <MyScen title={route.title}>}/>
);
}
}
AppRegistry.registerComponent('kisharNine', () => kisharNine);
Atom Beautify: Beautify EditorHere is a link to the debug.md Gist: https://gist.github.com/anonymous/66ce808c1baff47968e203dd35d574d9/d2d88afa498597304feb57ca1d1fdcc3104bd989
I have:
debug.md Gist to this issuePretty Diff defect verified at http://prettydiff.com
Problem is a failure of Pretty Diff's markup parser to accept JavaScript line comments as markup attributes. I will have a solution soon.
Thanks, that actually helped. I took out the comments and it formatted fine.
Closing as a Pretty Diff bug.
Most helpful comment
Problem is a failure of Pretty Diff's markup parser to accept JavaScript line comments as markup attributes. I will have a solution soon.