57 ((data[i]>='a' && data[i]<='z') || \ 58 (data[i]>='A' && data[i]<='Z') || \ 59 (data[i]>='0' && data[i]<='9') || \ 60 (((unsigned char)data[i])>=0x80)) // unicode characters 63 #define isOpenEmphChar(i) \ 64 (data[i]=='\n' || data[i]==' ' || data[i]=='\'' || data[i]=='<' || \ 65 data[i]=='{' || data[i]=='(' || data[i]=='[' || data[i]==',' || \ 66 data[i]==':' || data[i]==';') 70 #define ignoreCloseEmphChar(i) \ 71 (data[i]=='(' || data[i]=='{' || data[i]=='[' || data[i]=='<' || \ 72 data[i]=='=' || data[i]=='+' || data[i]=='-' || data[i]=='\\' || \ 121 case '<': growBuf.
addStr(
"\\<");
break;
122 case '>': growBuf.
addStr(
"\\>");
break;
123 case '\\': growBuf.
addStr(
"\\\\");
break;
124 case '@': growBuf.
addStr(
"\\@");
break;
125 default: growBuf.
addChar(c);
break;
129 return growBuf.
get();
137 result.
at(size)=
'\0';
146 if (leftMarker && rightMarker)
154 else if (rightMarker)
185 bool openBracket = offset>0 && data[-1]==
'{';
186 bool isEscaped = offset>0 && (data[-1]==
'\\' || data[-1]==
'@');
190 while (end<size && (data[end]>=
'a' && data[end]<=
'z')) end++;
194 if (blockName==
"code" && openBracket)
198 else if (blockName==
"dot" ||
201 blockName==
"verbatim" ||
202 blockName==
"latexonly" ||
203 blockName==
"htmlonly" ||
204 blockName==
"xmlonly" ||
205 blockName==
"rtfonly" ||
206 blockName==
"manonly" ||
207 blockName==
"docbookonly" 212 else if (blockName==
"startuml")
216 else if (blockName==
"f" && end<size)
222 else if (data[end]==
'[')
226 else if (data[end]==
'}')
243 while (i<size && data[i]!=c && data[i]!=
'`' &&
244 data[i]!=
'\\' && data[i]!=
'@' &&
259 while (i+len<size && data[i+len]==c)
266 if (len!=c_size || (i<size-len &&
isIdChar(i+len)))
279 while (i<size && data[i]==
'`') snb++,i++;
283 while (i<size && enb<snb)
285 if (data[i]==
'`') enb++;
286 if (snb==1 && data[i]==
'\'')
break;
290 else if (data[i]==
'@' || data[i]==
'\\')
299 if ((data[i]==
'\\' || data[i]==
'@') &&
300 data[i-1]!=
'\\' && data[i-1]!=
'@')
302 if (
qstrncmp(&data[i+1],endBlockName,l)==0)
319 else if (data[i]==
'\n')
322 while (i<size && data[i]==
' ') i++;
323 if (i>=size || data[i]==
'\n')
return 0;
340 if (size>1 && data[0]==c && data[1]==c) { i=1; }
345 if (len==0)
return 0;
347 if (i>=size)
return 0;
349 if (i+1<size && data[i+1]==c)
354 if (data[i]==c && data[i-1]!=
' ' && data[i-1]!=
'\n')
378 if (i+1<size && data[i]==c && data[i+1]==c && i && data[i-1]!=
' ' &&
409 if (data[i]!=c || data[i-1]==
' ' || data[i-1]==
'\n')
414 if (i+2<size && data[i+1]==c && data[i+2]==c)
416 out.
addStr(
"<em><strong>");
418 out.
addStr(
"</strong></em>");
421 else if (i+1<size && data[i+1]==c)
457 if (i<size && data[i]==
'-')
461 if (i<size && data[i]==
'-')
465 if (i<size && data[i]==
'-')
469 if (count==2 && (off<8 ||
qstrncmp(data-8,
"operator",8)!=0))
488 while (i<size && data[i]!=
'"' && nl<2)
490 if (data[i]==
'\n') nl++;
493 if (i<size && data[i]==
'"' && nl<2)
507 if (offset>0 && data[-1]==
'\\')
return 0;
513 while (i<size &&
isIdChar(i)) i++,l++;
516 if (tagName.
lower()==
"pre")
518 bool insideStr=
FALSE;
522 if (!insideStr && c==
'<')
524 if (data[i+1]==
'/' &&
525 tolower(data[i+2])==
'p' && tolower(data[i+3])==
'r' &&
526 tolower(data[i+4])==
'e' && tolower(data[i+5])==
'>')
533 else if (insideStr && c==
'"')
535 if (data[i-1]!=
'\\') insideStr=
FALSE;
548 if (data[i]==
'/' && i<size-1 && data[i+1]==
'>')
554 else if (data[i]==
'>')
560 else if (data[i]==
' ')
563 bool insideAttr=
FALSE;
566 if (!insideAttr && data[i]==
'"')
570 else if (data[i]==
'"' && data[i-1]!=
'\\')
574 else if (!insideAttr && data[i]==
'>')
592 (size>1 && data[0]!=data[1] && !(
isIdChar(1) || data[1]==
'[')) ||
593 (size>2 && data[0]==data[1] && !(
isIdChar(2) || data[2]==
'[')))
600 if (size>2 && data[1]!=c)
603 if (data[1]==
' ' || data[1]==
'\n' ||
610 if (size>3 && data[1]==c && data[2]!=c)
612 if (data[2]==
' ' || data[2]==
'\n' ||
619 if (size>4 && data[1]==c && data[2]==c && data[3]!=c)
621 if (data[3]==
' ' || data[3]==
'\n' ||
636 int contentStart,contentEnd,linkStart,titleStart,titleEnd;
637 bool isImageLink =
FALSE;
643 if (size<2 || data[1]!=
'[')
658 else if (data[i]==
'[')
662 else if (data[i]==
']')
667 else if (data[i]==
'\n')
674 if (i>=size)
return 0;
678 if (!isImageLink && content.
isEmpty())
return 0;
682 while (i<size && data[i]==
' ') i++;
683 if (i<size && data[i]==
'\n')
687 while (i<size && data[i]==
' ') i++;
690 bool explicitTitle=
FALSE;
691 if (i<size && data[i]==
'(')
694 while (i<size && data[i]==
' ') i++;
695 if (i<size && data[i]==
'<') i++;
699 while (i<size && data[i]!=
'\'' && data[i]!=
'"' && braceCount>0)
706 else if (data[i]==
'(')
710 else if (data[i]==
')')
719 if (i>=size || data[i]==
'\n')
return 0;
727 if (data[i]==
'\'' || data[i]==
'"')
733 while (i<size && data[i]!=
')')
748 while (titleEnd>titleStart && data[titleEnd]==
' ') titleEnd--;
749 if (data[titleEnd]==c)
761 else if (i<size && data[i]==
'[')
767 while (i<size && data[i]!=
']')
776 if (i>=size)
return 0;
800 else if (i<size && data[i]!=
':' && !content.
isEmpty())
811 else if (content==
"TOC")
828 if (g_current) g_current->
stat=
TRUE;
830 else if (isImageLink)
834 if (link.
find(
"@ref ")!=-1 || link.
find(
"\\ref ")!=-1 ||
838 out.
addStr(
"@image html ");
840 if (!explicitTitle && !content.
isEmpty())
846 else if ((content.
isEmpty() || explicitTitle) && !title.
isEmpty())
855 out.
addStr(
"<img src=\"");
882 if (explicitTitle && !title.
isEmpty())
892 else if (link.
find(
'/')!=-1 || link.
find(
'.')!=-1 || link.
find(
'#')!=-1)
920 int end,
nb = 0, i, f_begin, f_end;
923 while (nb<size && data[nb]==
'`')
931 for (end=nb; end<size && i<nb && nl<2; end++)
937 else if (data[end]==
'\n')
947 if (i < nb && end >= size)
958 while (f_begin < end && data[f_begin]==
' ')
963 while (f_end > nb && data[f_end-1]==
' ')
973 if (data[i]==
'\'' && !
isIdChar(i+1))
1002 int l = endBlockName.
length();
1005 if ((data[i]==
'\\' || data[i]==
'@') &&
1006 data[i-1]!=
'\\' && data[i-1]!=
'@')
1008 if (
qstrncmp(&data[i+1],endBlockName,l)==0)
1018 if (size>1 && data[0]==
'\\')
1021 if (c==
'[' || c==
']' || c==
'*' ||
1022 c==
'!' || c==
'(' || c==
')' || c==
'`' || c==
'_')
1024 if (c==
'-' && size>3 && data[2]==
'-' && data[3]==
'-')
1029 else if (c==
'-' && size>2 && data[2]==
'-')
1052 out.
addStr(data+i,end-i);
1053 if (end>=size)
break;
1055 end =
action(out,data+i,i,size-i);
1072 while (i<size && data[i]==
' ') i++;
1077 while (i<size && data[i]==
'=') i++,
c++;
1078 while (i<size && data[i]==
' ') i++;
1079 return (c>1 && (i>=size || data[i]==
'\n')) ? 1 : 0;
1084 while (i<size && data[i]==
'-') i++,
c++;
1085 while (i<size && data[i]==
' ') i++;
1086 return (c>1 && (i>=size || data[i]==
'\n')) ? 2 : 0;
1095 while (i<size && data[i]==
' ') i++;
1100 while (i<size && (data[i]==
'>' || data[i]==
' '))
1102 if (data[i]==
'>') level++;
1107 return level>0 && i<size && ((data[i-1]==
' ') || data[i]==
'\n');
1123 while (i<size && data[i]==
' ') i++;
1124 if (i>=size || data[i]!=
'[')
return 0;
1127 while (i<size && data[i]!=
'\n' && data[i]!=
']') i++;
1128 if (i>=size || data[i]!=
']')
return 0;
1130 if (refid.
isEmpty())
return 0;
1133 if (i>=size || data[i]!=
':')
return 0;
1137 while (i<size && data[i]==
' ') i++;
1138 if (i<size && data[i]==
'\n')
1141 while (i<size && data[i]==
' ') i++;
1143 if (i>=size)
return 0;
1145 if (i<size && data[i]==
'<') i++;
1147 while (i<size && data[i]!=
' ' && data[i]!=
'\n') i++;
1149 if (i<size && data[i]==
'>') i++;
1150 if (linkStart==linkEnd)
return 0;
1153 if (link==
"@ref" || link==
"\\ref")
1156 while (i<size && data[i]!=
'\n' && data[i]!=
'"') i++;
1166 while (i<size && data[i]==
' ') i++;
1167 if (i<size && data[i]==
'\n')
1171 while (i<size && data[i]==
' ') i++;
1180 if (c==
'\'' || c==
'"' || c==
'(')
1187 while (i<size && data[i]!=
'\n') i++;
1192 while (end>titleStart && data[end]!=c) end--;
1199 while (i<size && data[i]==
' ') i++;
1202 if (i>=size)
return i;
1203 else if (eol)
return eol;
1210 if (size>0 && data[size-1]==
'\n') size--;
1211 while (i<size && data[i]==
' ') i++;
1212 if (i>=size)
return 0;
1214 if (c!=
'*' && c!=
'-' && c!=
'_')
1225 else if (data[i]!=
' ')
1237 static QRegExp r2(
"\\{#[a-z_A-Z][a-z_A-Z0-9\\-]*\\}");
1239 int i = r2.
match(title,0,&l);
1243 title = title.
left(i);
1256 int level = 0, blanks=0;
1259 while (i<size && data[i]==
' ') i++;
1260 if (i>=size || data[i]!=
'#')
1264 while (i<size && level<6 && data[i]==
'#') i++,level++;
1265 while (i<size && data[i]==
' ') i++,blanks++;
1266 if (level==1 && blanks==0)
1273 while (
end<size && data[
end]!=
'\n')
end++;
1274 while (
end>i && (data[
end-1]==
'#' || data[
end-1]==
' '))
end--;
1282 while (i>=0 && (header.
at(i)==
'#' || header.
at(i)==
' ')) i--;
1283 header=header.
left(i+1);
1294 if (data[i]==
'\n')
return TRUE;
1295 if (data[i]!=
' ')
return FALSE;
1301 #define isLiTag(i) \ 1302 (data[(i)]=='<' && \ 1303 (data[(i)+1]=='l' || data[(i)+1]=='L') && \ 1304 (data[(i)+2]=='i' || data[(i)+2]=='I') && \ 1315 bool listMarkerSkipped=
FALSE;
1318 (!listMarkerSkipped &&
1319 (data[i]==
'+' || data[i]==
'-' || data[i]==
'*' ||
1320 (data[i]==
'#' && i>0 && data[i-1]==
'-') ||
1321 (isDigit=(data[i]>=
'1' && data[i]<=
'9')) ||
1322 (isLi=(i<size-3 &&
isLiTag(i)))
1331 while (j<size && ((data[j]>=
'0' && data[j]<=
'9') || data[j]==
'.'))
1335 if (j<size-1 && data[j+1]==
' ')
1337 listMarkerSkipped=
TRUE;
1354 listMarkerSkipped=
TRUE;
1356 else if (data[i]==
'-' && i<size-2 && data[i+1]==
'#' && data[i+2]==
' ')
1358 listMarkerSkipped=
TRUE;
1362 else if (data[i]!=
' ' && i<size-1 && data[i+1]==
' ')
1364 listMarkerSkipped=
TRUE;
1366 if (data[i]!=
' ' && !listMarkerSkipped)
1384 while (i<size && data[i]==
' ') indent++,i++;
1385 if (indent>=refIndent+4)
return FALSE;
1387 if (i<size && data[i]==
'`') tildaChar=
'`';
1388 while (i<size && data[i]==tildaChar) startTildes++,i++;
1389 if (startTildes<3)
return FALSE;
1390 if (i<size && data[i]==
'{') i++;
1392 while (i<size && (data[i]!=
'\n' && data[i]!=
'}' && data[i]!=
' ')) i++;
1394 while (i<size && data[i]!=
'\n') i++;
1398 if (data[i]==tildaChar)
1402 while (i<size && data[i]==tildaChar) endTildes++,i++;
1403 while (i<size && data[i]==
' ') i++;
1404 if (i==size || data[i]==
'\n')
1407 return endTildes==startTildes;
1421 while (i<size && data[i]==
' ') indent0++,i++;
1428 if (indent0>=size || data[indent0]==
'\n')
1440 if (data[i-offset-1]==
'\n') nl_pos[nl++]=i-offset;
1445 if (i==0 && nl==2) nl_pos[nl++]=-offset;
1456 if (!
isEmptyLine(data+nl_pos[1],nl_pos[0]-nl_pos[1]-1))
1496 while (i<size && data[i]==
' ') i++;
1497 if (i<size && data[i]==
'|' && data[i]!=
'\n') i++,
n++;
1501 while (i<size && data[i]!=
'\n') i++;
1504 while (i>0 && data[i]==
' ') i--;
1505 if (i>0 && data[i-1]!=
'\\' && data[i]==
'|') i--,n++;
1515 if (data[i]==
'|' && (i==0 || data[i-1]!=
'\\')) columns++;
1516 if (columns==1) columns++;
1520 if (n==2 && columns==0)
1536 if (i>=size || cc0<1)
1548 if (data[j]!=
':' && data[j]!=
'-' && data[j]!=
'|' && data[j]!=
' ')
1580 int headerStart = start;
1581 int headerEnd =
end;
1589 bool startFound=
FALSE;
1595 if (data[j]==
':') { leftMarker=
TRUE; startFound=
TRUE; }
1596 if (data[j]==
'-') startFound=
TRUE;
1599 if (data[j]==
'-') rightMarker=
FALSE;
1600 else if (data[j]==
':') rightMarker=
TRUE;
1601 if (j<=end+i && (data[j]==
'|' && (j==0 || data[j-1]!=
'\\')))
1627 switch (columnAlignment[k])
1635 while (m<=headerEnd && (data[m]!=
'|' || (m>0 && data[m-1]==
'\\')))
1648 if (cc!=columns)
break;
1659 switch (columnAlignment[k])
1668 if (j<=end+i && (data[j]==
'|' && (j==0 || data[j-1]!=
'\\')))
1687 delete[] columnAlignment;
1701 else if ((level=
isAtxHeader(data,size,header,
id)))
1706 if (level<5 && !
id.isEmpty())
1711 case 1: out.
addStr(
"@section ");
1714 case 2: out.
addStr(
"@subsection ");
1717 case 3: out.
addStr(
"@subsubsection ");
1720 default: out.
addStr(
"@paragraph ");
1754 out.
addStr(
"\\anchor "+
id+
"\n");
1757 out.
addStr(
"<"+hTag+
">");
1759 out.
addStr(
"</"+hTag+
">\n");
1778 while (end<=size && data[end-1]!=
'\n') end++;
1783 while (j<end && (data[j]==
' ' || data[j]==
'>'))
1785 if (data[j]==
'>') { level++; indent=j+1; }
1786 else if (j>0 && data[j-1]==
'>') indent=j+1;
1789 if (j>0 && data[j-1]==
'>' &&
1790 !(j==size || data[j]==
'\n'))
1797 for (l=curLevel;l<
level;l++)
1799 out.
addStr(
"<blockquote>\n");
1802 else if (level<curLevel)
1804 for (l=level;l<curLevel;l++)
1806 out.
addStr(
"</blockquote>\n");
1810 if (level==0)
break;
1812 out.
addStr(data+indent,end-indent);
1817 for (l=0;l<curLevel;l++)
1819 out.
addStr(
"</blockquote>\n");
1828 out.
addStr(
"@verbatim\n");
1834 while (
end<=size && data[
end-1]!=
'\n')
end++;
1837 while (j<
end && data[j]==
' ') j++,indent++;
1847 while (emptyLines>0)
1862 out.
addStr(
"@endverbatim\n");
1863 while (emptyLines>0)
1876 int &
pi,
int&i,
int &
end)
1881 while (end<=size && data[end-1]!=
'\n')
1885 if ((data[end-1]==
'\\' || data[end-1]==
'@') &&
1886 (end<=1 || (data[end-2]!=
'\\' && data[end-2]!=
'@'))
1893 int l = endBlockName.
length();
1894 for (;end<size-l-1;end++)
1896 if ((data[end]==
'\\' || data[end]==
'@') &&
1897 data[end-1]!=
'\\' && data[end-1]!=
'@' 1900 if (
qstrncmp(&data[end+1],endBlockName,l)==0)
1905 out.
addStr(data+pi,i-pi);
1909 out.
addStr(data+i,end+l+1-i);
1919 else if (nb==0 && data[end-1]==
'<' && end<size-6 &&
1920 (end<=1 || (data[end-2]!=
'\\' && data[end-2]!=
'@'))
1923 if (tolower(data[end])==
'p' && tolower(data[end+1])==
'r' &&
1924 tolower(data[end+2])==
'e' && data[end+3]==
'>')
1928 out.
addStr(data+pi,i-pi);
1931 out.
addStr(data+i,end-1-i);
1943 else if (nb==0 && data[end-1]==
'`')
1945 while (end<=size && data[end-1]==
'`') end++,nb++;
1947 else if (nb>0 && data[end-1]==
'`')
1950 while (end<=size && data[end-1]==
'`') end++,enb++;
1962 int blockStart,
int blockEnd)
1965 if (!lang.
isEmpty() && lang.
at(0)==
'.') lang=lang.
mid(1);
1969 out.
addStr(
"{"+lang+
"}");
1971 out.
addStr(data+blockStart,blockEnd-blockStart);
1981 int i=0,
end=0,
pi=-1;
1982 int blockStart,blockEnd,blockOffset;
2015 if (
pi!=-1 &&
pi<size)
2041 int blockIndent =
indent;
2046 while (
end<=size && data[
end-1]!=
'\n')
2048 if (data[
end-1]==
' ') sp++;
2052 #if 0 // commented out, since starting with a comment block is probably a usage error 2075 int blockStart,blockEnd,blockOffset;
2084 while (
pi<size && data[
pi]==
' ')
pi++;
2093 out.
addStr(level==1?
"@section ":
"@subsection ");
2123 out.
addStr(level==1?
"<h1>":
"<h2>");
2125 out.
addStr(level==1?
"\n</h1>\n":
"\n</h2>\n");
2180 if (
pi!=-1 &&
pi<size)
2206 while (i<size && (data[i]==
' ' || data[i]==
'\n'))
2208 if (data[i]==
'\n') ln++;
2211 if (i>=size)
return "";
2213 while (end1<size && data[end1-1]!=
'\n') end1++;
2221 while (end2<size && data[end2-1]!=
'\n') end2++;
2227 docs=lns+docs.
mid(end2);
2233 if (i<end1 &&
isAtxHeader(data+i,end1-i,title,
id)>0)
2235 docs=docs.
mid(end1);
2249 const int maxIndent=1000000;
2250 int minIndent=maxIndent;
2258 int stop = tabSize - (col%tabSize);
2261 while (stop--) out.
addChar(
' ');
2277 if (((
uchar)c&0xE0)==0xE0 && i<size)
2281 if (((
uchar)c&0xF0)==0xF0 && i<size)
2286 if (col<minIndent) minIndent=col;
2290 if (minIndent!=maxIndent) refIndent=minIndent;
else refIndent=0;
2323 if (input.
isEmpty())
return input;
2348 if (i!=-1) baseFn = baseFn.
left(i);
2354 const char *fileBuf,
2371 if (!mdfileAsMainPage.
isEmpty() &&
2372 (fn==mdfileAsMainPage ||
2377 docs.
prepend(
"@mainpage "+title+
"\n");
2379 else if (
id==
"mainpage" ||
id==
"index")
2381 if (title.
isEmpty()) title = titleFn;
2382 docs.
prepend(
"@mainpage "+title+
"\n");
2386 if (title.
isEmpty()) title = titleFn;
2387 docs.
prepend(
"@page "+
id+
" "+title+
"\n");
2397 bool needsEntry =
FALSE;
2416 current =
new Entry;
2433 const char *scopeName,
2436 bool isExampleBlock,
2437 const char *exampleName,
2441 bool inlineFragment,
2443 bool showLineNumbers,
2452 codeOutIntf,scopeName,input,lang,isExampleBlock,exampleName,
2453 fileDef,startLine,endLine,inlineFragment,memberDef,showLineNumbers,
2454 searchCtx,collectXRefs);
static bool markdownSupport
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Q_EXPORT int qstrncmp(const char *str1, const char *str2, uint len)
ParserInterface * getParser(const char *extension)
static void convertStringFragment(QCString &result, const char *data, int size)
static bool isTableBlock(const char *data, int size)
QCString stripWhiteSpace() const
static int processEmphasis2(GrowBuf &out, const char *data, int size, char c)
static constexpr double nb
static int isAtxHeader(const char *data, int size, QCString &header, QCString &id)
static int processEmphasis1(GrowBuf &out, const char *data, int size, char c)
void addStr(const char *s)
#define ignoreCloseEmphChar(i)
The QRegExp class provides pattern matching using regular expressions or wildcards.
void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)
void append(const type *d)
Abstract interface for programming language parsers.
static int computeIndentExcludingListMarkers(const char *data, int size)
static int processEmphasis(GrowBuf &out, const char *data, int offset, int size)
static action_t g_actions[256]
static int processHtmlTag(GrowBuf &out, const char *data, int offset, int size)
int docLine
line number at which the documentation was found
void addSubEntry(Entry *e)
static int isHRuler(const char *data, int size)
static QCString processQuotations(const QCString &s, int refIndent)
QCString left(uint len) const
static int writeTableBlock(GrowBuf &out, const char *data, int size)
static void findEndOfLine(GrowBuf &out, const char *data, int size, int &pi, int &i, int &end)
int(* action_t)(GrowBuf &out, const char *data, int offset, int size)
int find(char c, int index=0, bool cs=TRUE) const
void writeOneLineHeaderOrRuler(GrowBuf &out, const char *data, int size)
void append(const char *key, const T *d)
int findRev(char c, int index=-1, bool cs=TRUE) const
virtual void parsePrototype(const char *text)=0
static int processSpecialCommand(GrowBuf &out, const char *data, int offset, int size)
static QCString processBlocks(const QCString &s, int indent)
static QCString stripFromPath(const QCString &path, QStrList &l)
QString absFilePath() const
static Alignment markersToAlignment(bool leftMarker, bool rightMarker)
#define Config_getInt(val)
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
int findTableColumns(const char *data, int size, int &start, int &end, int &columns)
static int isHeaderline(const char *data, int size)
static ParserManager * parserManager
static int processNmdash(GrowBuf &out, const char *data, int off, int size)
static int isEmptyLine(const char *data, int size)
LinkRef(const QCString &l, const QCString &t)
static int writeBlockQuote(GrowBuf &out, const char *data, int size)
static int findEmphasisChar(const char *data, int size, char c, int c_size)
static int processEmphasis3(GrowBuf &out, const char *data, int size, char c)
static QCString extractTitleId(QCString &title)
static void writeFencedCodeBlock(GrowBuf &out, const char *data, const char *lng, int blockStart, int blockEnd)
static int writeCodeBlock(GrowBuf &out, const char *data, int size, int refIndent)
FileDef * findFileDef(const FileNameDict *fnDict, const char *n, bool &ambig)
QList< SectionInfo > * anchors
list of anchors defined in this entry
void parsePrototype(const char *text)
static void print(DebugMask mask, int prio, const char *fmt,...)
QCString & prepend(const char *s)
static SectionDict * sectionDict
A bunch of utility functions.
const char * data() const
static QCString extractPageTitle(QCString &docs, QCString &id)
#define Config_getString(val)
static QCString detab(const QCString &s, int &refIndent)
void warn(const char *file, int line, const char *fmt,...)
static FileNameDict * imageNameDict
static int processQuoted(GrowBuf &out, const char *data, int, int size)
QCString mid(uint index, uint len=0xffffffff) const
int match(const QCString &str, int index=0, int *len=0, bool indexIsStart=TRUE) const
void resetCodeParserState()
QCString & sprintf(const char *format,...)
static int processCodeSpan(GrowBuf &out, const char *data, int, int size)
static bool isFencedCodeBlock(const char *data, int size, int refIndent, QCString &lang, int &start, int &end, int &offset)
static bool isCodeBlock(const char *data, int offset, int size, int &indent)
const int codeBlockIndent
static int processLink(GrowBuf &out, const char *data, int, int size)
SrcLangExt getLanguageFromFileName(const QCString fileName)
QCString processMarkdown(const QCString &fileName, const int lineNr, Entry *e, const QCString &input)
static QCString escapeSpecialChars(const QCString &s)
static bool isBlockQuote(const char *data, int size, int indent)
static QCString g_fileName
bool fill(char c, int len=-1)
QCString fileName
file this entry was extracted from
QCString docFile
file in which the documentation was found
static void processInline(GrowBuf &out, const char *data, int size)
The QFileInfo class provides system-independent file information.
QCString markdownFileNameToId(const QCString &fileName)
SrcLangExt lang
programming language in which this entry was found
#define isOpenEmphChar(i)
T * find(const char *key)
static QCString isBlockCommand(const char *data, int offset, int size)
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
void parseInput(const char *fileName, const char *fileBuf, Entry *root, bool sameTranslationUnit, QStrList &filesInSameTranslationUnit)
std::string nl(std::size_t i=1)
const char * qPrint(const char *s)
static int isLinkRef(const char *data, int size, QCString &refid, QCString &link, QCString &title)
QCString simplifyWhiteSpace() const
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
static QDict< LinkRef > g_linkRefs(257)
virtual void resetCodeParserState()=0