File: html_section_pages.pike

package info (click to toggle)
pike7 7.0.361-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,876 kB
  • ctags: 12,334
  • sloc: ansic: 142,667; makefile: 1,526; sh: 1,035; lisp: 290; sed: 34; perl: 3
file content (28 lines) | stat: -rw-r--r-- 513 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "types.h"
#if __VERSION__ >= 0.6
import ".";
#endif /* __VERSION__ >= 0.6 */
inherit "html.pike";


SGML split_tag(TAG t, TAG t2)
{
  switch(t2->tag)
  {
    case "section":
      t2->data=low_split(t2->data);
      sections[t2->params->number]=({t});
      return ({
	Sgml.Tag("h3",0,0,({
	  Sgml.Tag("link",(["to":t2->params->number]),0,
		   ({
		     sprintf("%s %s",
			     t2->params->number,
			     (string) t2->params->title),
		       }) ),
	    }) )
	  });
  }
  return ::split_tag(t,t2);
}