Update of /cvsroot/mahogany/M/src/util
In directory usw-pr-cvs1:/tmp/cvs-serv12763/src/util
Modified Files:
matchurl.cpp
Log Message:
consider that if the last character of an URL on the line is a slash, then it's not
wrapped
Index: matchurl.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/util/matchurl.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -b -u -2 -r1.20 -r1.21
--- matchurl.cpp 20 Oct 2002 11:31:23 -0000 1.20
+++ matchurl.cpp 6 Nov 2002 00:27:53 -0000 1.21
@@ -490,4 +490,13 @@
static bool CanBeWrapped(const char *p)
{
+ // first check: if the last character on the previous line is a slash,
+ // suppose that it's the trailing slash at the end of URL.
+ //
+ // Rationale: slashes are relatively rare in the URLs and so it's unlikely
+ // that an URL is accidentally wrapped at one of them, but many URLs end in
+ // a slash
+ if ( p[-1] == '/' )
+ return false;
+
// we consider any alphanumeric string of 3 characters an extension
// but we have separate arrays of known extensions of other lengths
@@ -677,6 +686,5 @@
if ( p - start > 5 && !CanBeWrapped(p) )
{
- // apparently we have an extension at the end of this line, so
- // consider that the URL ends here
+ // it seems that the URL ends here
break;
}
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates