nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.64k stars 3.12k forks source link

docs: node: point at telnet module now #3489

Closed nwf closed 2 years ago

nwf commented 2 years ago

See 8d091c476edf6ae2977a5f2a74bf5824d07d6183

marcelstoer commented 2 years ago

Just fixed the links (from _ to -).

HHHartmann commented 2 years ago

OK. This doesn't work in https://nodemcu.readthedocs.io/en/dev/modules/node/#nodeinput The link gets expanded to https://github.com/nodemcu/nodemcu-firmware/tree/dev/lua-modules/telnet/ Should be https://nodemcu.readthedocs.io/en/dev/lua-modules/telnet/

marcelstoer commented 2 years ago

Oh, just realized we have the same issue on the BME280 math page.

Caused by this https://github.com/nodemcu/nodemcu-firmware/blob/release/docs/js/extra.js#L46

HHHartmann commented 2 years ago

Staring at the code not knowing much about js it might be that adding a "/" to the relativePath might do the job. I assume that the dots are evaluated as wildcats matching any character. Thus effectively matching the intended start of "../../dev" but also "../lua-modules"

marcelstoer commented 2 years ago

With the docs a lot of stuff isn't as it may seem - and much of it stems from the requirement of having links work both while browsing GitHub and inside the docs.

Side note: in JavaScript the pattern in String.prototype.replace() can be a string or a RegExp; we use it with a string.