Mercurial > projects > dil
changeset 784:939097e0990f
Fixed the summary section scanner.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Sat, 23 Feb 2008 02:26:43 +0100 |
parents | 8380fb2c765f |
children | 57ef69eced96 |
files | trunk/src/dil/doc/Doc.d |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;