summaryrefslogtreecommitdiff
path: root/includes/pear/Text/Wiki/Parse/Default/Toc.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 19:48:44 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 19:48:44 +0100
commitd637a023b8cbe98792dee9e1c79ba830958de594 (patch)
tree9f41fe8589d45e56a7aba6e61f579b1cdfad3739 /includes/pear/Text/Wiki/Parse/Default/Toc.php
parent3672db5d25accc0ddd05b05232e7680f32384f50 (diff)
downloadutil-d637a023b8cbe98792dee9e1c79ba830958de594.tar.gz
util-d637a023b8cbe98792dee9e1c79ba830958de594.tar.bz2
util-d637a023b8cbe98792dee9e1c79ba830958de594.zip
Tidy pear library down to used components so it can be maintained in later versions of PHP
Diffstat (limited to 'includes/pear/Text/Wiki/Parse/Default/Toc.php')
-rwxr-xr-x[-rw-r--r--]includes/pear/Text/Wiki/Parse/Default/Toc.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/includes/pear/Text/Wiki/Parse/Default/Toc.php b/includes/pear/Text/Wiki/Parse/Default/Toc.php
index dd29a57..05b15bc 100644..100755
--- a/includes/pear/Text/Wiki/Parse/Default/Toc.php
+++ b/includes/pear/Text/Wiki/Parse/Default/Toc.php
@@ -12,7 +12,7 @@
*
* @license LGPL
*
-* @version $Id: Toc.php 187179 2005-05-28 21:33:02Z pmjones $
+* @version $Id$
*
*/
@@ -20,7 +20,7 @@
*
* Looks through parsed text and builds a table of contents.
*
-* This class implements a Text_Wiki_Parse to find all heading tokens and
+* This class implements a Text_Wiki_Parse_Default to find all heading tokens and
* build a table of contents. The [[toc]] tag gets replaced with a list
* of all the level-2 through level-6 headings.
*
@@ -33,7 +33,7 @@
*/
-class Text_Wiki_Parse_Toc extends Text_Wiki_Parse {
+class Text_Wiki_Parse_Default_Toc extends Text_Wiki_Parse {
/**
@@ -85,46 +85,46 @@ class Text_Wiki_Parse_Toc extends Text_Wiki_Parse {
$output = $this->wiki->addToken(
$this->rule,
array(
- 'type' => 'list_start',
- 'level' => 0,
- 'attr' => $attr
+ "type" => "list_start",
+ "level" => 0,
+ "attr" => $attr
)
);
- foreach ($this->wiki->getTokens('Heading') as $key => $val) {
+ foreach ($this->wiki->getTokens("Heading") as $key => $val) {
- if ($val[1]['type'] != 'start') {
+ if ($val[1]["type"] != "start") {
continue;
}
$options = array(
- 'type' => 'item_start',
- 'id' => $val[1]['id'],
- 'level' => $val[1]['level'],
- 'count' => $count ++
+ "type" => "item_start",
+ "id" => $val[1]["id"],
+ "level" => $val[1]["level"],
+ "count" => $count ++
);
$output .= $this->wiki->addToken($this->rule, $options);
- $output .= $val[1]['text'];
+ $output .= $val[1]["text"];
$output .= $this->wiki->addToken(
$this->rule,
array(
- 'type' => 'item_end',
- 'level' => $val[1]['level']
+ "type" => "item_end",
+ "level" => $val[1]["level"]
)
);
}
$output .= $this->wiki->addToken(
$this->rule, array(
- 'type' => 'list_end',
- 'level' => 0
+ "type" => "list_end",
+ "level" => 0
)
);
return "\n$output\n";
}
}
-?> \ No newline at end of file
+?>