anchor.diff:      var hasDartdoc = info['dartdoc'] != null;
       var isVariable = kind.contains('variable');
   
  -    var apiLink = _dartApiLink(
  -        libraryName: libraryName,
  -        enclosingClassName: info['enclosingClassName']);
  +    var apiLink = _dartApiLink(libraryName);
   
       var propagatedType = info['propagatedType'];
       var _mdDocs = '''# `${info['description']}`\n\n
   ${hasDartdoc ? "${info['dartdoc']}\n\n" : ''}
   ${isVariable ? "$kind\n\n" : ''}
   ${(isVariable && propagatedType != null) ? "**Propagated type:** $propagatedType\n\n" : ''}
  -${libraryName == null ? '' : apiLink}\n\n''';
  +$apiLink\n\n''';
   
       var _htmlDocs = markdown.markdownToHtml(_mdDocs,
           inlineSyntaxes: [InlineBracketsColon(), InlineBrackets()]);
  
positive.code: import 'dart:html';
  import 'dart:math' as math;
  
  import 'package:markdown/markdown.dart' as markdown;
  
  import 'context.dart';
  
negative.code:     return _DocResult(_htmlDocs, kind.replaceAll(' ', '_'));
    }
  
    String _dartApiLink(String /*?*/ libraryName) {
      if (libraryName == null) {
        return '';
      }
  
      final usingFlutter = hasFlutterContent(_sourceProvider.dartSource);
      if (libraryName.contains('dart:') || usingFlutter) {
        if (usingFlutter) {
          final splitFlutter = libraryName.split('/');
          if (splitFlutter[0] == 'package:flutter') {
            final splitName = splitFlutter[2];
            if (splitName != null) {
              libraryName = splitName;
            } else {
              // If this part of the path is not present, we cannot link to the
              // documentation currently.
              return libraryName;
            }
          }
        }
  
        final apiLink = StringBuffer();
        apiLink.write('[Open library docs](');
  
        if (usingFlutter) {
          apiLink.write('https://api.flutter.dev/flutter');
        } else {
          apiLink.write('https://api.dart.dev/stable');
        }
  
        libraryName = libraryName.replaceAll(':', '-');
        apiLink.write('/$libraryName/$libraryName-library.html)');
  
        return apiLink.toString();
      }
  
      return libraryName;
    }
  }
  