mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
958da7ff63
* progmodes/js.el: Add JSX indentation support. (js-jsx-indent-line) (js-jsx-mode): New functions.
86 lines
994 B
JavaScript
86 lines
994 B
JavaScript
// -*- mode: js-jsx; -*-
|
|
|
|
var foo = <div></div>;
|
|
|
|
return (
|
|
<div>
|
|
</div>
|
|
<div>
|
|
<div></div>
|
|
<div>
|
|
<div></div>
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
React.render(
|
|
<div>
|
|
<div></div>
|
|
</div>,
|
|
{
|
|
a: 1
|
|
},
|
|
<div>
|
|
<div></div>
|
|
</div>
|
|
);
|
|
|
|
return (
|
|
// Sneaky!
|
|
<div></div>
|
|
);
|
|
|
|
return (
|
|
<div></div>
|
|
// Sneaky!
|
|
);
|
|
|
|
React.render(
|
|
<input
|
|
/>,
|
|
{
|
|
a: 1
|
|
}
|
|
);
|
|
|
|
return (
|
|
<div>
|
|
{array.map(function () {
|
|
return {
|
|
a: 1
|
|
};
|
|
})}
|
|
</div>
|
|
);
|
|
|
|
return (
|
|
<div attribute={array.map(function () {
|
|
return {
|
|
a: 1
|
|
};
|
|
|
|
return {
|
|
a: 1
|
|
};
|
|
|
|
return {
|
|
a: 1
|
|
};
|
|
})}>
|
|
</div>
|
|
);
|
|
|
|
// Local Variables:
|
|
// indent-tabs-mode: nil
|
|
// js-indent-level: 2
|
|
// End:
|
|
|
|
// The following test has intentionally unclosed elements and should
|
|
// be placed below all other tests to prevent awkward indentation.
|
|
|
|
return (
|
|
<div>
|
|
{array.map(function () {
|
|
return {
|
|
a: 1
|