X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a5a0dd06b67fecd5e571bd9d4221101393d5561b..3dc0174140ffc52a08fd5b64cf839babad09e5cf:/utils/HelpGen/src/docripper.cpp diff --git a/utils/HelpGen/src/docripper.cpp b/utils/HelpGen/src/docripper.cpp index 9599d61920..3b50e47cbc 100644 --- a/utils/HelpGen/src/docripper.cpp +++ b/utils/HelpGen/src/docripper.cpp @@ -22,7 +22,11 @@ #include "docripper.h" -#include +#if wxUSE_IOSTREAMH + #include +#else + #include +#endif // script templates @@ -178,12 +182,14 @@ void RipperDocGen::AppendComments( spContext& fromContext, string& str ) if ( lst[i]->StartsParagraph() ) { str += mTags[TAG_PARAGRAPH].start; + } str += lst[i]->mText; } // remove new lines, and insert paragraph breaks + // if empty lines found size_t len = str.length(); @@ -192,22 +198,38 @@ void RipperDocGen::AppendComments( spContext& fromContext, string& str ) if ( str[n] == 10 || str[n] == 13 ) + { + if ( n + 2 < len ) + { + if ( ( str[n] == 13 && str[n+1] == 10 && // FIXME:: quick-hack + str[n+2] == 13 ) || + ( str[n] == 10 && str[n+1] == 10 ) + ) + { + str.insert( n + 1, "

" ); // FIXME:: quick-hack + len += 3; + } + } + + str[n] = ' '; + } + str += mTags[TAG_PARAGRAPH].end; } @@ -423,9 +445,12 @@ void RipperDocGen::VisitTypeDef( spTypeDef& td ) void RipperDocGen::VisitPreprocessorLine( spPreprocessorLine& pd ) { if ( pd.mDefType != SP_PREP_DEF_REDEFINE_SYMBOL ) + + return; + if ( CheckIfUncommented( pd, *mpMacroIdx ) ) return;