Skip to content
Snippets Groups Projects
Commit 0bbd3558 authored by Mirar (Pontus Hagland)'s avatar Mirar (Pontus Hagland)
Browse files

one page per section

Rev: tutorial/html_section_pages.pike:1.1
parent 69092c2c
No related branches found
No related tags found
No related merge requests found
inherit "html.pike";
void split_and_remove_section(object t,object prev)
{
if (t->data)
foreach (t->data,object t2)
if (objectp(t2))
{
split_and_remove_section(t2,t->tag=="anchor"?t:0);
if (t2->tag=="section")
{
object tq;
if (prev)
{
sections[t2->params->number]=({t});
prev->data-=({t});
}
else
{
sections[t2->params->number]=({t2});
t->data-=({t2});
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment