Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368788

Summary: Auto Indentation for Script Tags does not Work
Product: [WebTools] WTP Source Editing Reporter: Jan-Raphael Chua <aeroheart.c6.notifications>
Component: wst.sseAssignee: wst.sse <wst.sse-inbox>
Status: RESOLVED WONTFIX QA Contact: Nick Sandonato <nsand.dev>
Severity: minor    
Priority: P3 CC: cmjaun, thatnitind
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Jan-Raphael Chua CLA 2012-01-16 23:55:11 EST
When using the script tag with the type specified to "text/mustache" or a non-JS type. Auto indentation for whatever is typed between the tags does not take effect. Even highlighting multiple lines and indenting it all at once does not work. When a new line is entered, it always goes to the beginning of the line.

The same behaviour is observed when typing those kind of codes in an .html file or a .php file (which I am assuming would be different editor instances)

a sample would be:

<script type="text/mustache">
  <div>
    <ul>
      <li></li>
      <li></li>
    </ul>
  </div>
</script>
Comment 1 Nick Sandonato CLA 2013-11-22 11:39:58 EST
Hi Jan-Raphael,

This is a construct of Mustache, and not anything explicitly defined by any standard. So we have no plan to implement this in the project.

You could implement this support in your own plug-in, however. This would allow you to define content assist, syntax highlighting, and formatting.
Comment 2 Nick Sandonato CLA 2013-11-22 11:40:21 EST
.
Comment 3 Jan-Raphael Chua CLA 2013-12-06 01:06:02 EST
Hi Nick,

I'm sorry to hear that. Although I think this case could have applied to any arbitrary text and not just Mustache constructs. Thinking that since I do this on *.html files, I filed the request here.

If it changes, even just putting the cursor to the previous line's indentation level and shift+tab unindent would have been really great (sadly, I don't know the term Eclipse uses for this feature). Not really looking into syntax highlighting anymore.

Although, thanks for taking the time to look into things!

P.S.
Using Eclipse's ordinary text editor, the indentation features are present and usable on said constructs (script tag with values other than "text/javascript")