Sublime Forum

Build 3154 - ASP Package - Mangling Code and auto correcting incorrectly



I have a situation where the ASP package is changing some code when I load a file.

For Example

<input type="button" value="Void Application" onclick='window.location="/srvc/appl/appl_voidtd_h.asp?app_id=<%=l_id %>&cmd=vd"' />

is being changed to

<input type="button" value="Void Application" onclick='window.location="/srvc/appl/appl_voidtd_h.asp?app_id=<%=l_id %>&cmd=vd"'%=l_id %>&cmd=vd"' />

The code in the first code block is valid asp code however the package is trying to auto correct. This has only started happening in the last few builds.




It seems highly unlikely that this is caused by the ASP package that ships with ST, as there is no Python plugin as part of that package and the contents of the buffer can only be modified when opening a file by a plugin - I can’t reproduce on build 3154. Perhaps you have some third party package installed that is causing this?

indeed, the ASP package hasn’t changed for 8 months…



Thanks for the feedback. I tried reverting back to a fresh install by removing my sublime text preference folder. I’ll reinstall tomorrow and try and replicate.



I’ve done some testing and here is what I’ve managed to replicate.

Steps to follow.

  1. Create a new file ‘test.asp’ with the following contents.
    <%if (someBoolean) then%> <input type="button" value="Void Application" onclick='window.location="/srvc/appl/appl_voidtd_h.asp?app_id=<%=l_id %>&cmd=vd"' /> <input type="button" value="Turn Down Application" onclick='window.location="/srvc/appl/appl_voidtd_h.asp?app_id=<%=l_id %>&cmd=td"' /> <% elseif AnotherBoolean OR _ NewLineBoolean THEN %> <input type="button" value="Do &amp; Void" onclick='confirmVoid();' /> <% end if%>

Now try and open this file in sublime text and it will replicate the <%=l_id %>&cmd=vd"' section of code.
To be sure it wasn’t my installed packages I tried all the above with fresh installs.
Here is what I found when I tested.

3143 Fresh install

  • Opens test.asp without issues

3154 Fresh Install w/ ASP Enabled

  • Fails test, text duplicated, deleting inside inline ASP doesn’t work

3154 Fresh Install w/ ASP Disabled

  • Works as expected

The only package I installed in the tests was Package Control so i could disable the ASP package that ships with ST3.

@kingkeith I agree with your comment that the asp has no python however to edit the code but I’m wondering if there is some magic in the syntax files.

For the time being i’ve switched back to the release build 3143 and everything is working as expected.


Dev Build 3153
PHP Autocomplete bug

thanks for taking the time to investigate, I can also replicate this, it looks like a major regression as ST should never sporadically modify ones files!
this has also been logged at