From 3a0a18ff0d26a6a8b1ed9cd726e539bcc817c875 Mon Sep 17 00:00:00 2001
From: "hakan.sandell" <hakan.sandell@mydata.se>
Date: Sat, 24 Oct 2009 20:26:12 +0200
Subject: [PATCH] rowspan efficency

darcs-hash:20091024182612-9a5f4-756475dbae2bd70cd16f675a8ace155d260937a6.gz
---
 inc/parser/xhtml.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 8bc2d12cd..e68df6709 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -858,6 +858,8 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
         // modify created table to add rowspan for cells containing :::
         // first preprocess created xhtml table and transfer data to $tbody array
         $table = substr($this->doc, $this->_counter['table_begin_pos']);
+        if (!preg_match('/>\s*?:::\s*?</', $table)) return;
+
         preg_match('/(<table.*?>)(.*?)<\/table>/ims', $table, $matches, PREG_OFFSET_CAPTURE);
         $tbody_prefix = $matches[1][0];
         $nrow = preg_match_all('/(<tr.*?>)(.*?)<\/tr>/ims', $matches[2][0], $matches); // split and get number of rows
-- 
GitLab