pike.git / lib / modules / Tools.pmod / Standalone.pmod / autodoc_to_html.pike

version» Context lines:

pike.git/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_html.pike:581:    ret->add(resolve_reference(parse_text(c), c->get_attributes()));    break;    }    string ref;    //ref = c->get_attributes()->resolved;    if(!ref) ref = parse_text(c);    ret->add("<font face='courier'>", ref, "</font>");    break;       case "rfc": -  string rfc = parse_text(c); -  sscanf(rfc, "%[0-9]", rfc); +  { +  string rfc = upper_case(parse_text(c)); +  string section; +  sscanf(rfc, "%[0-9]:%[.A-Z0-9]", rfc, section);    if (sizeof(rfc) < 4) rfc = ("0000" + rfc)[<3..];    ret->add("<b><a href='http://pike.lysator.liu.se/docs/ietf/rfc/", -  rfc[..<2], "/rfc", rfc, ".xml'>RFC ", rfc, "</a></b>"); +  rfc[..<2], "/rfc", rfc, ".xml"); +  if( section && sizeof(section) ) +  ret->add("#", section); +  else +  section = 0; +  ret->add("'>RFC ", rfc); +  if( section ) +  { +  if( section[0] > '9' ) +  ret->add(" appendix "); +  else +  ret->add(" section "); +  ret->add(section); +  } +  ret->add("</a></b>"); +  }    break;       case "dl":    ret->add("<dl>", map(c->get_elements("group"), parse_text)*"", "</dl>");    break;       case "item":    if(c->get_attributes()->name) {    ret->add("<dt>", c->get_attributes()->name, "</dt>\n");    if(c->count_children() &&