# HG changeset patch # User Aziz K?ksal # Date 1203730003 -3600 # Node ID 939097e0990f4dd223cbe0ab16ac6c367349a040 # Parent 8380fb2c765f4a018b5d18be6b56db54cdc97450 Fixed the summary section scanner. diff -r 8380fb2c765f -r 939097e0990f trunk/src/dil/doc/Doc.d --- a/trunk/src/dil/doc/Doc.d Sat Feb 23 02:15:41 2008 +0100 +++ b/trunk/src/dil/doc/Doc.d Sat Feb 23 02:26:43 2008 +0100 @@ -158,7 +158,21 @@ // Search for the end of the first paragraph. end--; // Decrement end, so we can look ahead one character. while (p < end && !(*p == '\n' && p[1] == '\n')) + { + // Skip over code sections. This is unlike how dmd behaves. + if (p+2 < end && *p == '-' && p[1] == '-' && p[2] == '-') + { + while (p < end && *p == '-') + p++; + p--; + while (++p < end) + if (p+2 < end && *p == '-' && p[1] == '-' && p[2] == '-') + break; + if (p >= end) + break; + } p++; + } end++; if (p+1 >= end) p = end;