apidoc::tcl_to_html (public)
apidoc::tcl_to_html proc_name
Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl
Given a proc name, formats it as HTML, including highlighting syntax in various colors and creating hyperlinks to other proc definitions. The inspiration for this proc was the tcl2html script created by Jeff Hobbs.
Known Issues:
- This proc will mistakenly highlight switch strings that look like commands as commands, etc.
- There are many undocumented AOLserver commands including all of the commands added by modules.
- When a proc inside a string has explicitly quoted arguments, they are not formatted.
- regexp and regsub are hard to parse properly. E.g. If we use the start option, and we quote its argument, and we have an ugly regexp, then this code might highlight it incorrectly.
- Parameters:
- proc_name (required)
- procedure to format in HTML
- Author:
- Jamie Rasmussen <jrasmuss@mle.ie>
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_api_browser_apidoc_tclcode_to_html
Source code: if {[namespace which ::xo::api] ne ""} { set scope [::xo::api scope_from_proc_index $proc_name] } else { set scope "" } set proc_namespace "" regexp {^(::)?(.*)::[^:]+$} $proc_name match colons proc_namespace return [tclcode_to_html -scope $scope -proc_namespace $proc_namespace [api_get_body $proc_name]] #package req nx::pp #append result # [tclcode_to_html -scope $scope -proc_namespace $proc_namespace [api_get_body $proc_name]] # <br> # [nx::pp render [api_get_body $proc_name]]XQL Not present: Generic, PostgreSQL, Oracle