svn: /web/pres2/trunk/ XML_Presentation.php objects.php

From: Date: Fri, 03 Jun 2011 19:03:41 +0000
Subject: svn: /web/pres2/trunk/ XML_Presentation.php objects.php
Groups: php.pres 
Request: Send a blank email to pres+get-1727@lists.php.net to get a copy of this message
rasmus Fri, 03 Jun 2011 19:03:41 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=311784 Log: Slight underline regex tweak and WS fixes Changed paths: U web/pres2/trunk/XML_Presentation.php U web/pres2/trunk/objects.php Modified: web/pres2/trunk/XML_Presentation.php =================================================================== --- web/pres2/trunk/XML_Presentation.php 2011-06-03 18:14:36 UTC (rev 311783) +++ web/pres2/trunk/XML_Presentation.php 2011-06-03 19:03:41 UTC (rev 311784) @@ -121,29 +121,29 @@ /* Special case for array properties */ case 'SLIDE': $this->objects[$this->coid]->slides[] = new _pres_slide(); - $idx = count($this->objects[$this->coid]->slides)-1; + $idx = count($this->objects[$this->coid]->slides)-1; $this->_add_attribs($this->objects[$this->coid]->slides[$idx], $attribs); $this->activeTag = $element; - if(!empty($this->activeSection)) { - $this->objects[$this->coid]->slides[$idx]->Section = $this->activeSection; - } - if(!empty($this->activeChapter)) { - $this->objects[$this->coid]->slides[$idx]->Chapter = $this->activeChapter; - } + if(!empty($this->activeSection)) { + $this->objects[$this->coid]->slides[$idx]->Section = $this->activeSection; + } + if(!empty($this->activeChapter)) { + $this->objects[$this->coid]->slides[$idx]->Chapter = $this->activeChapter; + } break; /* Everything else can't */ - case 'SECTION': - if(!empty($attribs['TITLE'])) { - $this->activeSection = $attribs['TITLE']; - } - break; + case 'SECTION': + if(!empty($attribs['TITLE'])) { + $this->activeSection = $attribs['TITLE']; + } + break; - case 'CHAPTER': - if(!empty($attribs['TITLE'])) { - $this->activeChapter = $attribs['TITLE']; - } - break; + case 'CHAPTER': + if(!empty($attribs['TITLE'])) { + $this->activeChapter = $attribs['TITLE']; + } + break; default: $this->activeTag = $element; Modified: web/pres2/trunk/objects.php =================================================================== --- web/pres2/trunk/objects.php 2011-06-03 18:14:36 UTC (rev 311783) +++ web/pres2/trunk/objects.php 2011-06-03 19:03:41 UTC (rev 311784) @@ -35,13 +35,13 @@ #id# Entity */ function markup_text($str) { - global $p; - $pres = $p->objects[1]; + global $p; + $pres = $p->objects[1]; - $ret = $str; + $ret = $str; # $ret = preg_replace('/\*([\S ]+?)([^\\\])\*/','<strong>\1\2</strong>',$str); $ret = preg_replace('/#([[:alnum:]]+?)#/','&\1;',$ret); - $ret = preg_replace('/\b_([\S ]+?)_\b/','<u>\1</u>',$ret); + $ret = preg_replace('/\b_([^_][\S ]+?)_\b/','<u>\1</u>',$ret); // blink $ret = str_replace('\*',chr(1),$ret); @@ -72,7 +72,7 @@ $ret = preg_replace('/TAB\//',' ',$ret); $ret = preg_replace('/([\\\])([*#_|^@%])/', '\2', $ret); - $ret = preg_replace('/:-:(.*?):-:/e','$pres->\\1',$ret); + $ret = preg_replace('/:-:(.*?):-:/e','$pres->\\1',$ret); return $ret; } // }}}

« previous php.pres (#1727) next »