[PATCH] Import quoted strings from the end of line properly

Miika Turkia miika.turkia at gmail.com
Sun Jan 25 01:27:50 PST 2015


We need a special case to import tags on our own CSV export as there is
no field separator at the end of the line.

See #814

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 xslt/subsurfacecsv.xslt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xslt/subsurfacecsv.xslt b/xslt/subsurfacecsv.xslt
index 33424bc..cb59cc9 100644
--- a/xslt/subsurfacecsv.xslt
+++ b/xslt/subsurfacecsv.xslt
@@ -414,6 +414,9 @@
               <xsl:when test="substring-before($line,'"$fs') != ''">
                 <xsl:value-of select="substring-before($line,'"$fs')"/>
               </xsl:when>
+              <xsl:when test="substring-before(substring-after($line, '"'), '"') != '' and substring-after(substring-after($line, '"'), '"') = ''">
+                <xsl:value-of select="substring-before(substring-after($line, '"'), '"')"/>
+              </xsl:when>
               <xsl:otherwise>
                 <xsl:choose>
                   <xsl:when test="substring-after(substring-after($line, '"'), '"') = ''">
-- 
1.9.1



More information about the subsurface mailing list