private void addSourceMarkdownToExport(Entry source,int index,StringBuilder result) throws IOException {
  result.append("Reference " + index + " ");
  final String title=source.getNoteOrTitle("");
  result.append(title);
  final String url=source.getSourceUrl();
  if (url != null && !url.isEmpty()) {
    result.append("  \n");
    result.append(" [" + url + "] [Reference"+ index+ "]");
    result.append("\n");
  }
 else {
    result.append("\n");
  }
  result.append("\n");
  result.append("[Reference" + index + "]: ");
  if (url != null && !url.isEmpty()) {
    result.append(url);
  }
  result.append(" \"");
  result.append(title);
  result.append("\"\n");
}

private void addSourceMarkdownToExport ( Entry source , int index , StringBuilder result ) throws IOException { result . append ( "Reference " + index + " " ) ; final String title = source . getNoteOrTitle ( "" ) ; result . append ( title ) ; final String url = source . getSourceUrl ( ) ; if ( url != null && ! url . isEmpty ( ) ) { result . append ( "  \n" ) ; result . append ( " [" + url + "] [Reference" + index + "]" ) ; result . append ( "\n" ) ; } else { result . append ( "\n" ) ; } result . append ( "\n" ) ; result . append ( "[Reference" + index + "]: " ) ; if ( url != null && ! url . isEmpty ( ) ) { result . append ( url ) ; } result . append ( " \"" ) ; result . append ( title ) ; result . append ( "\"\n" ) ; }
helper method . adds the markdown for a source to a list .
