docs should build under doc2; unittests of times.nim compile under 32bit; small bugfix for the tester

This commit is contained in:
Araq 2012-11-20 21:28:55 +01:00
commit c4b7a3e545
2 changed files with 9 additions and 6 deletions

View file

@ -56,7 +56,8 @@ proc extractSpec(filename: string): string =
var x = readFile(filename).string
var a = x.find(tripleQuote)
var b = x.find(tripleQuote, a+3)
if a >= 0 and b > a:
# look for """ only in the first section
if a >= 0 and b > a and a < 40:
result = x.substr(a+3, b-1).replace("'''", tripleQuote)
else:
#echo "warning: file does not contain spec: " & filename