After going through the code, I have found that the template "start" string is searched without any case conversions, but the template "end" string is searched differently based on the following 2 conditions:
1) The page source is converted to lower case before the comparison.
2) The comparison starts from the location of the "start" string.
Also, the final part of the string (this is the part which is matched against the actual template) that is obtained from the page source includes the "start" string but not the "end" string.
A consequence of (1) is that if your "end" string contains uppercase characters, it will never be matched. That was the problem I was having in another thread. I dont mean to belittle the efforts of James and other developers, but it makes more sense to me to do case insensitive comparisons for both "start" and "end" strings. So I have changed the code to convert both the page source, "start" and "end" strings to lowercase before the comparison.
1) The page source is converted to lower case before the comparison.
2) The comparison starts from the location of the "start" string.
Also, the final part of the string (this is the part which is matched against the actual template) that is obtained from the page source includes the "start" string but not the "end" string.
A consequence of (1) is that if your "end" string contains uppercase characters, it will never be matched. That was the problem I was having in another thread. I dont mean to belittle the efforts of James and other developers, but it makes more sense to me to do case insensitive comparisons for both "start" and "end" strings. So I have changed the code to convert both the page source, "start" and "end" strings to lowercase before the comparison.