From efcc4d035e4ecdb3ecc449770a5fd26694717efa Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 29 May 2018 11:29:30 +0200 Subject: =?UTF-8?q?Bug=C2=A0792918=20-=20incorrect=20parsing=20of=20markdo?= =?UTF-8?q?wn=20table?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem due to the fact that for the display of the header line the size of the separator line was used. The headerStart and headerEnd have to be set before the next call to 'findTableColumns' Related to: - pull request 537 Add support for more CSS and column/row spanning in markdown tables - pull request 542 Reverting pull request #537 until it will be fixed - commit on 16/09/2017: New table features mentioned in the documentation were not enabled. --- src/markdown.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index f7526dc..f5c0dfd 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -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(""); // write table header, in range [start..end] out.addStr(""); - - 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 > tableContents; tableContents.setAutoDelete(TRUE); - int headerStart = start; - int headerEnd = end; - int m=headerStart; QVector *headerContents = new QVector(columns); headerContents->setAutoDelete(TRUE); -- cgit v0.12