Write-Warning"The documentation in ${filename} doesn't seem to be markdown (extension: $($matches[2])). Only markdown is supported; please rewrite the documentation in markdown."
}
$inComment=$True
$endCommentRegex="\]$($matches[1])\]"
}elseif($_-match$startCommentRegex){
$failThisFile=$True
Write-Warning"Invalid start of comment -- the comment start must be at the beginning of the line.
(online:`"$_`")"
}else{
# do nothing -- we're outside a comment, so cmake code
}
}else{
if($_-match"^\s*#?${endCommentRegex}\s*$"){
$inComment=$False
$endCommentRegex=''
}elseif($_-match$endCommentRegex){
$failThisFile=$True
Write-Warning"Invalid end of comment -- the comment end must be on it's own on a line.
(online:`"$_`")"
}else{
# regular documentation line
$_
}
}
}
if($inComment){
Write-Warning"File ${filename} has an unclosed comment."
# don't worry about undocumented internal functions
Write-Warning"The cmake function in file $filename doesn't seem to have any documentation. Make sure the documentation comments are correctly written."