| Summary: | Wrong link in tooltip to open dependency file | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Silenio Quarti <Silenio_Quarti> |
| Component: | Client | Assignee: | Grant Gayed <grant_gayed> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | emoffatt, Michael_Rennie |
| Version: | 12.0 | ||
| Target Milestone: | 12.0 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Silenio Quarti
Something fishy is happening here. From the tools we only pass this back to the hover framework (as part of an object, indicating it should be processed as markdown: "[_utils.js](#/file/es6-project-starter-kit/tasks/_utils.js) - Orionode Workspace/es6-project-starter-kit/tasks/_utils.js" it seems like once you open a split markdown editor, you always get the split editor path added during hovers?? On the JS side of things we use the following code to create our HREF:
if(file.name && file.path && file.contentType) {
hover += '[';
var href = new URITemplate("#{,resource,params*}").expand( //$NON-NLS-1$
{
resource: file.location,
params: {}
});
hover += file.name + ']('+href+') - '+file.path+'\n\n'; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$
}
Where file.location is equal to '#/file/es6-project-starter-kit/tasks/_utils.js'
I debugged through this and it appears that the markdown editor is contributing a renderer (or something) to Marked so when the hover support uses Marked to format the link, the editor renderer augments the markdown. Not sure what the 'right' thing to do here is. Perhaps when navigating away from the markdown editor, it should clean up after itself and remove any renderers / etc. For context, debugging from hover.js#renderMarkdown will take you into markdownEditor#filterOutputLink after you have opened the editor at least once. |