From fd67ef1f66afb0b51a784866b806ba8f04e12dfb Mon Sep 17 00:00:00 2001 From: Dmitry Dorofeev Date: Thu, 3 Nov 2016 11:57:37 +0300 Subject: Reverting pull request #537 until it will be fixed Unfortunately code to support column/row spanning in markdown tables breaking latex/pdf generation in case of utf8 symbols in table headers (at least) Attempt to define USE_ORIGINAL_TABLES did not help, as important part of the code was moved to the wrong place, so this patch reverts original tables code while keeping span support in place for debugging/fixing. Just undefine USE_ORIGINAL_TABLES to enable span support. --- src/markdown.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index dee0045..67ceba2 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -37,7 +37,7 @@ #include #include #include -//#define USE_ORIGINAL_TABLES +#define USE_ORIGINAL_TABLES #include "markdown.h" #include "growbuf.h" @@ -1592,6 +1592,16 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size) i = findTableColumns(data,size,start,end,columns); +#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 int ret = findTableColumns(data+i,size-i,start,end,cc); k=0; @@ -1633,13 +1643,6 @@ static int writeTableBlock(GrowBuf &out,const char *data,int size) i+=ret; #ifdef USE_ORIGINAL_TABLES - out.addStr("
"); - - // write table header, in range [start..end] - out.addStr(""); - - int headerStart = start; - int headerEnd = end; int m=headerStart; for (k=0;k