summaryrefslogtreecommitdiff
path: root/inc/parser/xhtmlsummary.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-02-17 23:20:40 +0100
committerAndreas Gohr <andi@splitbrain.org>2006-02-17 23:20:40 +0100
commit98c868589ee0757f176239cf289cbd007bb74852 (patch)
treeeb48a172b0f1a423b93ffff35f8adf8d579383c1 /inc/parser/xhtmlsummary.php
parent1c73890c5027011d808d38c583561abc309e8086 (diff)
downloadrpg-98c868589ee0757f176239cf289cbd007bb74852.tar.gz
rpg-98c868589ee0757f176239cf289cbd007bb74852.tar.bz2
file cleanups
This patch cleans up the source code to satisfy the coding guidelines (see http://wiki.splitbrain.org/wiki:development#coding_style) It converts files to UNIX lineendings and removes tabs and trailing whitespace. Not all files were cleaned yet. darcs-hash:20060217222040-7ad00-bba3d2bee3b5aa7cbb5184258abd50805cd071bf.gz
Diffstat (limited to 'inc/parser/xhtmlsummary.php')
-rw-r--r--inc/parser/xhtmlsummary.php170
1 files changed, 85 insertions, 85 deletions
diff --git a/inc/parser/xhtmlsummary.php b/inc/parser/xhtmlsummary.php
index eeb684e57..669fa46e3 100644
--- a/inc/parser/xhtmlsummary.php
+++ b/inc/parser/xhtmlsummary.php
@@ -1,85 +1,85 @@
-<?php
-if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
-
-require_once DOKU_INC . 'inc/parser/xhtml.php';
-
-/**
-* The summary XHTML form selects either up to the first two paragraphs
-* it find in a page or the first section (whichever comes first)
-* It strips out the table of contents if one exists
-* Section divs are not used - everything should be nested in a single
-* div with CSS class "page"
-* Headings have their a name link removed and section editing links
-* removed
-* It also attempts to capture the first heading in a page for
-* use as the title of the page.
-*/
-class Doku_Renderer_xhtmlsummary extends Doku_Renderer_xhtml {
-
- // Namespace these variables to
- // avoid clashes with parent classes
- var $sum_paragraphs = 0;
- var $sum_capture = TRUE;
- var $sum_inSection = FALSE;
- var $sum_summary = '';
- var $sum_pageTitle = FALSE;
-
- function document_start() {
- $this->doc .= DOKU_LF.'<div>'.DOKU_LF;
- }
-
- function document_end() {
- $this->doc = $this->sum_summary;
- $this->doc .= DOKU_LF.'</div>'.DOKU_LF;
- }
-
- function toc_open() {
- $this->sum_summary .= $this->doc;
- }
-
- function toc_close() {
- $this->doc = '';
- }
-
- function header($text, $level, $pos) {
- if ( !$this->sum_pageTitle ) {
- $this->info['sum_pagetitle'] = $text;
- $this->sum_pageTitle = TRUE;
- }
- $this->doc .= DOKU_LF.'<h'.$level.'>';
- $this->doc .= $this->_xmlEntities($text);
- $this->doc .= "</h$level>".DOKU_LF;
- }
-
- function section_open($level) {
- if ( $this->sum_capture ) {
- $this->sum_inSection = TRUE;
- }
- }
-
- function section_close() {
- if ( $this->sum_capture && $this->sum_inSection ) {
- $this->sum_summary .= $this->doc;
- $this->sum_capture = FALSE;
- }
- }
-
- function p_open() {
- if ( $this->sum_capture && $this->sum_paragraphs < 2 ) {
- $this->sum_paragraphs++;
- }
- parent :: p_open();
- }
-
- function p_close() {
- parent :: p_close();
- if ( $this->sum_capture && $this->sum_paragraphs >= 2 ) {
- $this->sum_summary .= $this->doc;
- $this->sum_capture = FALSE;
- }
- }
-
-}
-
-
-//Setup VIM: ex: et ts=2 enc=utf-8 :
+<?php
+if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/');
+
+require_once DOKU_INC . 'inc/parser/xhtml.php';
+
+/**
+* The summary XHTML form selects either up to the first two paragraphs
+* it find in a page or the first section (whichever comes first)
+* It strips out the table of contents if one exists
+* Section divs are not used - everything should be nested in a single
+* div with CSS class "page"
+* Headings have their a name link removed and section editing links
+* removed
+* It also attempts to capture the first heading in a page for
+* use as the title of the page.
+*/
+class Doku_Renderer_xhtmlsummary extends Doku_Renderer_xhtml {
+
+ // Namespace these variables to
+ // avoid clashes with parent classes
+ var $sum_paragraphs = 0;
+ var $sum_capture = TRUE;
+ var $sum_inSection = FALSE;
+ var $sum_summary = '';
+ var $sum_pageTitle = FALSE;
+
+ function document_start() {
+ $this->doc .= DOKU_LF.'<div>'.DOKU_LF;
+ }
+
+ function document_end() {
+ $this->doc = $this->sum_summary;
+ $this->doc .= DOKU_LF.'</div>'.DOKU_LF;
+ }
+
+ function toc_open() {
+ $this->sum_summary .= $this->doc;
+ }
+
+ function toc_close() {
+ $this->doc = '';
+ }
+
+ function header($text, $level, $pos) {
+ if ( !$this->sum_pageTitle ) {
+ $this->info['sum_pagetitle'] = $text;
+ $this->sum_pageTitle = TRUE;
+ }
+ $this->doc .= DOKU_LF.'<h'.$level.'>';
+ $this->doc .= $this->_xmlEntities($text);
+ $this->doc .= "</h$level>".DOKU_LF;
+ }
+
+ function section_open($level) {
+ if ( $this->sum_capture ) {
+ $this->sum_inSection = TRUE;
+ }
+ }
+
+ function section_close() {
+ if ( $this->sum_capture && $this->sum_inSection ) {
+ $this->sum_summary .= $this->doc;
+ $this->sum_capture = FALSE;
+ }
+ }
+
+ function p_open() {
+ if ( $this->sum_capture && $this->sum_paragraphs < 2 ) {
+ $this->sum_paragraphs++;
+ }
+ parent :: p_open();
+ }
+
+ function p_close() {
+ parent :: p_close();
+ if ( $this->sum_capture && $this->sum_paragraphs >= 2 ) {
+ $this->sum_summary .= $this->doc;
+ $this->sum_capture = FALSE;
+ }
+ }
+
+}
+
+
+//Setup VIM: ex: et ts=2 enc=utf-8 :