From 89b2cd1481a95616b155b0b08e7d7f99fcf12a66 Mon Sep 17 00:00:00 2001 From: xulihang Date: Thu, 27 Dec 2018 12:48:09 +0800 Subject: [PATCH] do not add lines at the beginning --- BasicCAT/BasicCAT.b4j.meta | 2 +- BasicCAT/Utils.bas | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/BasicCAT/BasicCAT.b4j.meta b/BasicCAT/BasicCAT.b4j.meta index 742d6fb..d958b6b 100644 --- a/BasicCAT/BasicCAT.b4j.meta +++ b/BasicCAT/BasicCAT.b4j.meta @@ -182,4 +182,4 @@ ModuleClosedNodes7= ModuleClosedNodes8= ModuleClosedNodes9= SelectedBuild=0 -VisibleModules=1,2,3,4,5,6,7,8,9,10,15,16,41,11,21,50 +VisibleModules=1,2,3,4,5,6,7,8,9,10,15,16,41,11,21,50,56 diff --git a/BasicCAT/Utils.bas b/BasicCAT/Utils.bas index 0b81dbb..3c4b215 100644 --- a/BasicCAT/Utils.bas +++ b/BasicCAT/Utils.bas @@ -161,12 +161,16 @@ Sub exportToMarkdownWithNotes(segments As List,path As String,filename As String Dim id As String id=extra.Get("id") If previousID<>id Then - fullsource=CRLF&fullsource + If id<>-1 Then + fullsource=CRLF&fullsource + End If previousID=id End If End If If innerFilename<>previousInnerFilename Then - fullsource=CRLF&fullsource + If previousInnerFilename<>"" Then + fullsource=CRLF&fullsource + End If previousInnerFilename=innerFilename End If source=Regex.Replace2("<.*?>",32,source,"") @@ -214,12 +218,16 @@ Sub exportToBiParagraph(segments As List,path As String,filename As String,sourc Dim id As String id=extra.Get("id") If previousID<>id Then - fullsource=CRLF&fullsource + If previousID<>-1 Then + fullsource=CRLF&fullsource + End If previousID=id End If End If If innerFilename<>previousInnerFilename Then - fullsource=CRLF&fullsource + If previousInnerFilename<>"" Then + fullsource=CRLF&fullsource + End If previousInnerFilename=innerFilename End If source=Regex.Replace2("<.*?>",32,source,"")