diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-08-11 13:06:22 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-08-11 13:06:22 (GMT) |
commit | 34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634 (patch) | |
tree | ad481e345a35820f0142bb774556afc6de0d00fa /src/markdown.cpp | |
parent | 3583a7c0bea47665a06d14a64b62376eee21c528 (diff) | |
download | Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.zip Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.tar.gz Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.tar.bz2 |
Release-1.8.2
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r-- | src/markdown.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index d69e05c..0c7c2f8 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -93,7 +93,7 @@ static QCString g_fileName; // as a title of the page, in effect making it a level0 header, so the // level of all other sections needs to be corrected as well. // This flag is TRUE if corrections are needed. -static bool g_correctSectionLevel; +//static bool g_correctSectionLevel; //---------- @@ -1618,8 +1618,8 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size) } else if ((level=isAtxHeader(data,size,header,id))) { - if (level==1) g_correctSectionLevel=FALSE; - if (g_correctSectionLevel) level--; + //if (level==1) g_correctSectionLevel=FALSE; + //if (g_correctSectionLevel) level--; QCString hTag; if (level<5 && !id.isEmpty()) { @@ -1737,7 +1737,8 @@ static int writeCodeBlock(GrowBuf &out,const char *data,int size,int refIndent) int j=i; int indent=0; while (j<end && data[j]==' ') j++,indent++; - //printf("j=%d end=%d indent=%d refIndent=%d data={%s}\n",j,end,indent,refIndent,QCString(data+i).left(end-i-1).data()); + //printf("j=%d end=%d indent=%d refIndent=%d tabSize=%d data={%s}\n", + // j,end,indent,refIndent,Config_getInt("TAB_SIZE"),QCString(data+i).left(end-i-1).data()); if (j==end-1) // empty line { emptyLines++; @@ -1953,8 +1954,8 @@ static QCString processBlocks(const QCString &s,int indent) //printf("isHeaderLine(%s)=%d\n",QCString(data+i).left(size-i).data(),level); if ((level=isHeaderline(data+i,size-i))>0) { - if (level==1) g_correctSectionLevel=FALSE; - if (g_correctSectionLevel) level--; + //if (level==1) g_correctSectionLevel=FALSE; + //if (g_correctSectionLevel) level--; //printf("Found header at %d-%d\n",i,end); while (pi<size && data[pi]==' ') pi++; QCString header,id; @@ -2116,6 +2117,7 @@ static QCString detab(const QCString &s,int &refIndent) case '\t': // expand tab { int stop = tabSize - (col%tabSize); + //printf("expand at %d stop=%d\n",col,stop); col+=stop; while (stop--) out.addChar(' '); } @@ -2170,6 +2172,7 @@ QCString processMarkdown(const QCString &fileName,Entry *e,const QCString &input int refIndent; // for replace tabs by spaces QCString s = detab(input,refIndent); + //printf("======== DeTab =========\n---- output -----\n%s\n---------\n",s.data()); // then process quotation blocks (as these may contain other blocks) s = processQuotations(s,refIndent); //printf("======== Quotations =========\n---- output -----\n%s\n---------\n",s.data()); @@ -2203,7 +2206,7 @@ void MarkdownFileParser::parseInput(const char *fileName, QCString docs = output.data(); QCString id; QCString title=extractPageTitle(docs,id).stripWhiteSpace(); - g_correctSectionLevel = !title.isEmpty(); + //g_correctSectionLevel = !title.isEmpty(); QCString baseName = substitute(QFileInfo(fileName).baseName().utf8()," ","_"); if (id.isEmpty()) id = "md_"+baseName; if (title.isEmpty()) title = baseName; @@ -2255,7 +2258,7 @@ void MarkdownFileParser::parseInput(const char *fileName, // restore setting Doxygen::markdownSupport = markdownEnabled; - g_correctSectionLevel = FALSE; + //g_correctSectionLevel = FALSE; } void MarkdownFileParser::parseCode(CodeOutputInterface &codeOutIntf, @@ -2268,7 +2271,8 @@ void MarkdownFileParser::parseCode(CodeOutputInterface &codeOutIntf, int endLine, bool inlineFragment, MemberDef *memberDef, - bool showLineNumbers + bool showLineNumbers, + Definition *searchCtx ) { ParserInterface *pIntf = Doxygen::parserManager->getParser("*.cpp"); @@ -2276,7 +2280,7 @@ void MarkdownFileParser::parseCode(CodeOutputInterface &codeOutIntf, { pIntf->parseCode( codeOutIntf,scopeName,input,isExampleBlock,exampleName, - fileDef,startLine,endLine,inlineFragment,memberDef,showLineNumbers); + fileDef,startLine,endLine,inlineFragment,memberDef,showLineNumbers,searchCtx); } } |