-
-
Notifications
You must be signed in to change notification settings - Fork 747
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Links in code reference (and example code) #1498
Comments
something like this? url: http://www.espruino.com/Reference#ArrayBuffer link in text:
points to: http://www.espruino.com/DataView
: |
Thanks - I just added a fix for this and some other ArrayBuffer docs |
When executed in the JS console on the Reference page This snippet: ids = {};
for ([,n] of document.querySelectorAll('a[name]').entries()) {
ids[n.getAttribute('name')] = n;
}
links = [];
for ([,n] of document.querySelectorAll('a[href]').entries()) {
links.push(n.getAttribute('href'));
}
localLinks = links.filter(l => l.startsWith('#'));
localLinks.forEach(l => {
if (!ids[l.slice(1)])
console.log(`invalid href '${l}'`);
}) outputs the following:
|
BTW the #1498 (comment) issue seem to still be there. |
Thanks - the #1498 (comment) is still there because the docs are for 1v99, so the changes I put in aren't in those docs. If you do Good spot on the invalid hrefs though - just fixed that. Again though it won't take effect until the v2.00 release |
Most of the Espruino reference page is really bad at linking through to other referenced functions. For example
NRF.requestDevice
may be mentioned inNRF.findDevices
, but it should be a link so it can be clicked.I recently changed the documentation builder so as long as the actual documentation contains the function/class/event's name inside single backticks, it should get automatically linked.
So, please can you flag up if:
Maybe just post up here if you find something? Or you can fix it yourself:
⇒
icon to the right of the affected function's heading/*JSON{ .... }
part you can just write code as simple Markdown). Put multiline code the three backticks```
, or just reference objects/functions/methods etc inline in a single backtickThe text was updated successfully, but these errors were encountered: