ad_parse_documentation_string

 ad_parse_documentation_string

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 ad_library ad_library (public) ad_parse_documentation_string ad_parse_documentation_string ad_library->ad_parse_documentation_string ad_page_contract ad_page_contract (public) ad_page_contract->ad_parse_documentation_string ad_proc ad_proc (public) ad_proc->ad_parse_documentation_string initialize initialize initialize->ad_parse_documentation_string instproc instproc instproc->ad_parse_documentation_string

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
[ hide source ] | [ make this the default ]
Show another procedure: