出于某种原因,当我使用 Aptana 的 JS 编辑器格式化这个 dojo-fied javascript 块时
var eventInput = new dijit.form.Select({
name : 'event',
options : [{
label : 'Today',
value : 'event-today',
selected : true
}, {
label : 'Upcoming Birthday',
value : 'event-birthday1'
}, {
label : 'Recent Birthday',
value : 'event-birthday2'
}, {
label : 'Other',
value : 'event-other'
}]
}).placeAt('event-group');
标签在自动格式化时被破坏
var eventInput = new dijit.form.Select({
name : 'event',
options : [{
label : 'Today',
value : 'event-today',
selected : true
}, {
label : 'Upcoming Birthday',
value : 'event-birthday1'
}, {
label : 'Recent Birthday',
value : 'event-birthday2'
}, {
label : 'Other',
value : 'event-other'
}]
}).placeAt('event-group');
类似这样的块
dojo.create('p', {
id : 'subject-group'
}, 'form');
格式正确,保留标签。
Aptana 的 Eclipse 插件版本不这样做并且格式正确。这发生在 Aptana Studio 3 的普通版本上,没有任何插件或修改。有没有人遇到过这个?