Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Added .ASP files highlighting #4615

Open
core-ai-bot opened this issue Aug 29, 2021 · 11 comments
Open

[CLOSED] Added .ASP files highlighting #4615

core-ai-bot opened this issue Aug 29, 2021 · 11 comments

Comments

@core-ai-bot
Copy link
Member

Issue by dananichev
Saturday Aug 31, 2013 at 07:11 GMT
Originally opened as adobe/brackets#5010


Issue #4883. Maps .ASP files to "htmlmixed" highlighting.


dananichev included the following code: https://github.com/adobe/brackets/pull/5010/commits

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Tuesday Sep 03, 2013 at 17:11 GMT


Thanks@Fr3nzzy. Can you sign the CLA http://dev.brackets.io/brackets-contributor-license-agreement.html before we merge?

@core-ai-bot
Copy link
Member Author

Comment by dananichev
Tuesday Sep 03, 2013 at 20:06 GMT


@jasonsanjose ofc, i will sign it tomorrow (i need to read it before, right?:)). If it's alright. I'm going to sleep now.

@core-ai-bot
Copy link
Member Author

Comment by dananichev
Tuesday Sep 03, 2013 at 20:14 GMT


Turns out, it's very small CLA. Signed.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Sep 04, 2013 at 04:13 GMT


Done with code review.

@core-ai-bot
Copy link
Member Author

Comment by dananichev
Wednesday Sep 04, 2013 at 06:00 GMT


Fixed. My bad.
But, also, i have a question about multiline comments. As far as i know, there are no multiline comments in VBScript. But it's been a while...

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Sep 04, 2013 at 15:22 GMT


Good catch. Correct there are no block comments in VBScript. There is also the REM single-line comment statement.

@core-ai-bot
Copy link
Member Author

Comment by dananichev
Wednesday Sep 04, 2013 at 15:47 GMT


I've removed block comments array for VBScript. Also REM added to list of line comments.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Sep 04, 2013 at 18:10 GMT


I'll merge this to get coloring for .vbs files and .asp files get HTML tag coloring.

Unfortunately, VBScript blocks in .asp file are not colored correctly, but it's not working for .aspx files, either.

Note that detecting script block delimiters is tricky because there are many delimiters types:

  • <%@LANGUAGE="VBSCRIPT"%> at top of page with <% ... %> in page
  • <script type="(text|application)\/(x-)?vb(a|script)">
  • <script runat="server">

@core-ai-bot
Copy link
Member Author

Comment by dananichev
Wednesday Sep 04, 2013 at 19:27 GMT


@redmunds Damn, i missed custom MIME declaration for "text/x-brackets-html". I can add <script type="(text|application)\/(x-)?vb(a|script)"> for "text/x-brackets-html" (it will enable VBScript highlighting in htmlmixed mode for <script type="text/vbscript"></script>.

Is there any way to enable <script runat="server"></script> and <%@LANGUAGE="VBSCRIPT"%>too? Because, right now it's partial solution and i want to do it right :) Can't reach codemirror.net for some reasons.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Sep 04, 2013 at 19:39 GMT


I already merged this pull request, so start a new one.

Since <%@LANGUAGE="VBSCRIPT"%> is specified at the top of the page, it won't work the same. You would have to assume that all <% ... %> and <script runat="server"> are VBScript (which is usually true).

@core-ai-bot
Copy link
Member Author

Comment by peterflynn
Wednesday Sep 04, 2013 at 22:02 GMT


To do it right I think you'd really want a new Language declaration specifically for asp/aspx -- probably based on CodeMirror's newer "htmlembedded" mode. We're shoehorning a lot of file types into the basic HTML mode right now not because it's the best answer, but just because no one has implemented the custom mode that's needed yet.

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

No branches or pull requests

1 participant