summaryrefslogtreecommitdiffstats
path: root/src/markdown.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r--src/markdown.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp
index f7526dc..0ca95a4 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -844,7 +844,7 @@ static int processLink(GrowBuf &out,const char *data,int,int size)
}
if (isToc) // special case for [TOC]
{
- if (g_current) g_current->stat=TRUE;
+ out.addStr("@tableofcontents");
}
else if (isImageLink)
{
@@ -1590,15 +1590,15 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
int columns,start,end,cc;
i = findTableColumns(data,size,start,end,columns);
-
+
+ int headerStart = start;
+ int headerEnd = end;
+
#ifdef USE_ORIGINAL_TABLES
out.addStr("<table>");
// write table header, in range [start..end]
out.addStr("<tr>");
-
- int headerStart = start;
- int headerEnd = end;
#endif
// read cell alignments
@@ -1712,9 +1712,6 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size)
QVector<QVector<TableCell> > tableContents;
tableContents.setAutoDelete(TRUE);
- int headerStart = start;
- int headerEnd = end;
-
int m=headerStart;
QVector<TableCell> *headerContents = new QVector<TableCell>(columns);
headerContents->setAutoDelete(TRUE);