onury / docma

A powerful tool to easily generate beautiful HTML documentation from JavaScript (JSDoc), Markdown and HTML files.

Home Page:https://onury.io/docma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After v2/v3 migration: @extends is empty

warpdesign opened this issue · comments

My partial looks like this:

This is what my jsDocs look like:

/**
 * The menu class allows to quickly add text menu to an Athena Scene
 *
 * Each menu entry is called menuItem and is a simple object with the following properties:
 * `{ text: 'menu text', selectable: true|false, active: true|false, visible: true|false }`
 *
 * @extends Drawable
 */
class Menu extends Drawable {
}

In v1 this worked as expected, displaying a link in the generated html page:

image

But when built using docma v2/3, the link doesn't appear next to "extends":

image

I also noticed that this particular doc section takes a very long time to be rendered: something like 3-4 seconds, in local.

This seems too long, even though the json that's loaded is rather big: ~400kb.

In Docma v1.x there was no auto-link feature. it was first introduced with v2.0.0. Docma calculates the link and provides $docmaLink property but the actual HTML linking is done via the template, not by Docma.

Could that be about your template? Maybe some part is not compatible with Docma web? Can you check the HTML source (by right clicking, then view source)?

EDIT: As an example, this is generated with Docma v3+ which has @extends tag and rendered properly by Zebra template. (It's not auto-linked due to being a Node.js class which I'll add support for future versions).

Actually this was implemented inside the 1.x template, but it was using an API that has changed as well, so was returning an empty string because it needed to be updated for the new API.