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 (required)
- 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):
- 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 <<a href=\"mailto:$email\">$email</a>>" } return $author_stringXQL Not present: Generic, PostgreSQL, Oracle