Open
Description
When using Dojo declarative syntax for writing methods developer can write inline JavaScript comments, e.g.:
<script type="dojo/method" data-dojo-event="getChildren" data-dojo-args="object">
// Supply a getChildren() method to store for the data model where
// children objects point to their parent (aka relational model)
return this.query({parent: this.getIdentity(object)});
</script>
(full example at http://livedocs.dojotoolkit.org/dijit/Tree-examples#id3 )
When spaces are being collapsed, such multiline code becomes single line of commented code, e.g.
<script [...]> // Supply [...] // children [...] return this.query({parent: this.getIdentity(object)}); </script>
which may lead to runtime errors about undefined variables (since now function doesn't return anything).
Spaces should be collapsed in smarter way taking in account such Dojo features.
Metadata
Metadata
Assignees
Labels
No labels