@ -126,6 +126,12 @@ static void WriteDocCommentBodyForLocation(io::Printer* printer,
const SourceLocation & location ,
const SourceLocation & location ,
const Options options ,
const Options options ,
const bool kdoc ) {
const bool kdoc ) {
if ( options . strip_nonfunctional_codegen ) {
// TODO: Remove once prototiller can avoid making
// extraneous formatting changes to comments.
return ;
}
std : : string comments = location . leading_comments . empty ( )
std : : string comments = location . leading_comments . empty ( )
? location . trailing_comments
? location . trailing_comments
: location . leading_comments ;
: location . leading_comments ;
@ -147,9 +153,6 @@ static void WriteDocCommentBodyForLocation(io::Printer* printer,
printer - > Print ( " * <pre> \n " ) ;
printer - > Print ( " * <pre> \n " ) ;
}
}
// TODO: Remove once prototiller can avoid making
// extraneous formatting changes to comments.
if ( ! options . strip_nonfunctional_codegen ) {
for ( size_t i = 0 ; i < lines . size ( ) ; i + + ) {
for ( size_t i = 0 ; i < lines . size ( ) ; i + + ) {
// Lines should start with a single space and any extraneous leading
// Lines should start with a single space and any extraneous leading
// spaces should be stripped. For lines starting with a /, the leading
// spaces should be stripped. For lines starting with a /, the leading
@ -166,7 +169,6 @@ static void WriteDocCommentBodyForLocation(io::Printer* printer,
printer - > Print ( " * \n " ) ;
printer - > Print ( " * \n " ) ;
}
}
}
}
}
if ( kdoc ) {
if ( kdoc ) {
printer - > Print ( " * ``` \n " ) ;
printer - > Print ( " * ``` \n " ) ;