ad_parse_documentation_string (private)
ad_parse_documentation_string doc_string elements_var
Defined in packages/acs-tcl/tcl/bootstrap-doc-procs.tcl
Parse an OpenACS documentation string into an array in the caller's scope. Replace any existing array and collect the main text and tagged elements as lists of values, preserving formatting within each element.
- Parameters:
- doc_string (required)
- Documentation text to parse.
- elements_var (required)
- Name of the caller's array to populate.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar $elements_var elements if { [info exists elements] } { unset elements } set lines [split $doc_string "\n\r"] array set elements [list] set current_element main set buffer "" foreach line $lines { # lars@pinds.com, 8 July, 2000 # We don't do a string trim anymore, because it breaks the formatting of # code examples in the documentation, something that we want to encourage. # set line [string trim $line] if { [regexp {^[ \t]*@([-a-zA-Z_]+)(.*)$} $line "" element remainder] } { lappend elements($current_element) [string trim $buffer] set current_element $element set buffer "$remainder\n" } else { append buffer $line "\n" } } lappend elements($current_element) [string trim $buffer]XQL Not present: Generic, PostgreSQL, Oracle