- console.log(i, structs[j]);
- var path = rootPath + imp[libs[i]][structs[j]];
- var klass = path.contains("type.") ? "type" : "struct";
- var link = $('<a>').text(structs[j])
- .attr('href', path)
- .attr('class', klass);
- var code = $('<code>').append(link);
+ var code = $('<code>').append(structs[j]);
+ $.each(code.find('a'), function(idx, a) {
+ var href = $(a).attr('href');
+ if (!href.startsWith('http')) {
+ $(a).attr('href', rootPath + $(a).attr('href'));
+ }
+ });