}
private void write_resolved_symbol_link (Api.Node symbol, string? given_label) {
+ var label = (given_label == null || given_label == "") ? symbol.get_full_name () : given_label;
if (symbol == _container || symbol == _owner) {
writer.start_tag ("span", {"css", cssresolver.resolve (symbol)})
- .text (symbol.name)
+ .text (label)
.end_tag ("span");
} else {
- var label = (given_label == null || given_label == "") ? symbol.get_full_name () : given_label;
var url = get_url (symbol);
if (url == null) {
write_unresolved_symbol_link (label);
private enum SymbolContext {
NORMAL,
+ FINISH,
TYPE
}
_symbol = api_root.search_symbol_cstr (container, symbol_name);
_context = SymbolContext.NORMAL;
+ if (_symbol == null && _symbol_name.has_suffix ("_finish")) {
+ string tmp = _symbol_name.substring (0, _symbol_name.length - 7);
+
+ _symbol = api_root.search_symbol_cstr (container, tmp + "_async") as Api.Method;
+ if (_symbol != null && ((Api.Method) _symbol).is_yields) {
+ _context = SymbolContext.FINISH;
+ } else {
+ _symbol = api_root.search_symbol_cstr (container, tmp) as Api.Method;
+ if (_symbol != null && ((Api.Method) _symbol).is_yields) {
+ _context = SymbolContext.FINISH;
+ } else {
+ _symbol = null;
+ }
+ }
+ }
+
if (_symbol == null) {
_symbol = api_root.search_symbol_type_cstr (symbol_name);
if (_symbol != null) {
if (_symbol != null) {
symbol_name = _symbol.name;
+
+ if (_context == SymbolContext.FINISH) {
+ symbol_name = symbol_name + ".end";
+ }
}
} else {
_symbol = api_root.search_symbol_str (container, symbol_name);
// TODO: move typeof () to gtkdoc-importer
switch (_context) {
+ case SymbolContext.FINISH:
+ // covered by symbol_name
+ return link;
+
case SymbolContext.TYPE:
Content.Run content = new Content.Run (Run.Style.MONOSPACED);