apidoc::format_author (public)

 apidoc::format_author author_string

Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl

Extracts information about the author and formats it into an HTML string.

Parameters:
author_string - author information to format. 3 kind of formats are expected: email (a mailto link to the email is generated), whitespace-separated couple " ()" (a mailto link for email and the name are generated) and free-form (the same input string is returned).
Returns:
the formatted result

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_format_author acs_api_browser_apidoc_format_author (test acs-api-browser) apidoc::format_author apidoc::format_author test_acs_api_browser_apidoc_format_author->apidoc::format_author api_library_documentation api_library_documentation (public) api_library_documentation->apidoc::format_author apidoc::format_author_list apidoc::format_author_list (private) apidoc::format_author_list->apidoc::format_author packages/xotcl-core/www/show-object.tcl packages/xotcl-core/ www/show-object.tcl packages/xotcl-core/www/show-object.tcl->apidoc::format_author

Testcases:
acs_api_browser_apidoc_format_author
Source code:
        if { [regexp {^[^ \n\r\t]+$} $author_string]
             && [string first "@" $author_string] >= 0
             && [string first ":" $author_string] < 0 } {
            return [subst {<a href="mailto:$author_string">$author_string</a>}]
        } elseif { [regexp {^([^\(\)]+)\s+\((.+)\)$} [string trim $author_string] {} name email] } {
            return "$name &lt;<a href=\"mailto:$email\">$email</a>&gt;"
        }
        return $author_string
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: