Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Script Tags don't get closed autoatically #4585

Open
JeffryBooher opened this issue Jul 26, 2013 · 4 comments
Open

Script Tags don't get closed autoatically #4585

JeffryBooher opened this issue Jul 26, 2013 · 4 comments

Comments

@JeffryBooher
Copy link
Contributor

Create a new html file and add

    <script src="main.js">

Now start to close the tag by typing <
--> brackets doesn't automatically insert the close tag

@RaymondLim
Copy link
Contributor

@JeffryBooher

Auto close tag does not work on <, but it should work on </. And the issue is in CodeMirror and you can reproduced it with this demo page http://codemirror.net/demo/closetag.html. So I don't think it is a starter bug.

@JeffryBooher
Copy link
Contributor Author

@RaymondLim thanks. I knew I had hoped that it would be an easy fix. I'll remove the starter bug label.

@RaymondLim
Copy link
Contributor

I can also reproduce the issue with <style></ since the inner mode is in "css" while the inner mode for script tag is "javascript". So autoCloseTag function is returning CodeMirror.Pass, meaning it is not handling those tags.

@peterflynn
Copy link
Member

Reviewed -- setting to "no priority." This is probably expected behavior currently, since it might well be valid within the nested mode to type "</" (e.g. inside a string literal or a regexp literal).

It also seems like a low impact bug, since typing simply <script> does correctly autocomplete the </script>. You'd have to manually delete that closing tag in order to hit this (or create the opening tag some other way, e.g. copy-paste).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants