Minor text formatting bug in .asp files

Ideas for new features

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
mschaff
Posts: 1
Joined: Fri Jan 20, 2012 8:35 pm
Location: United States
Contact:

Minor text formatting bug in .asp files

Post by mschaff »

Hello. As much as I appreciate the color highlighting within .asp pages (especially within the vbscript code), I've noticed that comments seem to throw the parsing logic for a loop.

A simple example:

Code: Select all

<%
' this is a comment
response.redirect("Test")
%>
If you paste the above in to a .asp page in TextPad, the first comment will show as green (or your comment color of choice). But the response.redirect line will ALSO be interpreted as a comment, which is definitely not as intended. It appears the internal flag gets set by the single quote, but doesn't get turned off at the end of the line. Until another comment is encountered, the text is processed as comments.

Interestingly, if I add an extra single quote at the end of the comment, as in the following:

Code: Select all

<%
' this is a comment '
response.redirect ("Test") 

%>
then the successive lines are formatted correctly. However, if the comment itself also includes single quotes, that process gets thrown off. And having to add trailing single quotes is less than ideal.

Anyway, thanks for reading this. With any luck, this will be a trivial fix, and I'm sure others have run across this before.

Kudos on a great product, by the way. I use TextPad on an everyday basis, and it makes a huge difference in my work.

Mitchell
Post Reply