Skip to content
Snippets Groups Projects
Commit f51ffdcf authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Removed duplicate link-case.

Rev: tutorial/html.pike:1.12
parent 0ad754bb
No related branches found
No related tags found
No related merge requests found
...@@ -323,14 +323,20 @@ SGML convert(SGML data) ...@@ -323,14 +323,20 @@ SGML convert(SGML data)
m_delete(data->params,"to"); m_delete(data->params,"to");
if(!link_to_page[to]) if(!link_to_page[to])
{ {
werror("Warning: Cannot find link "+to+" (near "+data->location()+")\n"); string s=(to/".")[-1];
ret+=data->data; if (link_to_page[s])
continue; to=s;
}else{ else
data->params->href=mklinkname(link_to_page[to])+"#"+to; {
werror("Warning: Cannot find link "+to
+" (near "+data->location()+")\n");
data->tag="anchor";
break; break;
} }
} }
data->params->href=mklinkname(link_to_page[to])+"#"+to;
break;
}
case "arguments": case "arguments":
ret+=convert(({ ret+=convert(({
...@@ -360,28 +366,6 @@ SGML convert(SGML data) ...@@ -360,28 +366,6 @@ SGML convert(SGML data)
Sgml.Tag("br")})); Sgml.Tag("br")}));
continue; continue;
case "link":
{
data->tag="a";
string to=data->params->to;
m_delete(data->params,"to");
if(!link_to_page[to])
{
string s=(to/".")[-1];
if (link_to_page[s])
to=s;
else
{
werror("Warning: Cannot find link "+to
+" (near "+data->location()+")\n");
data->tag="anchor";
break;
}
}
data->params->href=mklinkname(link_to_page[to])+"#"+to;
break;
}
case "ref": case "ref":
{ {
string to=data->params->to; string to=data->params->to;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment