Skip to content
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

docs: node: point at telnet module now #3489

Merged
merged 2 commits into from
Jan 7, 2022

Conversation

nwf
Copy link
Member

@nwf nwf commented Jan 2, 2022

See 8d091c4

  • This PR is for the dev branch rather than for the release branch.
  • This PR is compliant with the other contributing guidelines as well (if not, please describe why).
  • The code changes are reflected in the documentation at docs/*.

@nwf nwf requested review from marcelstoer and HHHartmann January 2, 2022 09:28
@@ -340,7 +340,8 @@ Submits a string to the Lua interpreter. Similar to `pcall(loadstring(str))`, bu
```lua
sk:on("receive", function(conn, payload) node.input(payload) end)
```
See the `telnet/telnet.lua` in `lua_examples` for a more comprehensive example.
See [the telnet lua module](../lua_modules/telnet.md) for a worked
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either "telnet Lua" or "Telnet Lua", isn't it?

docs/modules/node.md Outdated Show resolved Hide resolved
docs/modules/node.md Outdated Show resolved Hide resolved
@marcelstoer
Copy link
Member

Just fixed the links (from _ to -).

@HHHartmann HHHartmann added this to the 2022 rel 1 milestone Jan 7, 2022
@HHHartmann HHHartmann merged commit 496a640 into nodemcu:dev Jan 7, 2022
@marcelstoer
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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.

  • In the original node.md with have See [the telnet lua module](../lua-modules/telnet.md) for... -> relative link 1 level up
  • His works when browsing GitHub
  • When this is built into the HTML structure by RTD/MkDocs this becomes <p>See <a href="../../lua-modules/telnet/">the telnet lua module</a> for a working -> relative link 2 levels up
  • Our JavaScript code can't tell the two apart and applies the "fix" to both.

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

marcelstoer added a commit that referenced this pull request Feb 25, 2024
* docs: node: point at telnet module now

See 8d091c4

* Fix links

Co-authored-by: Marcel Stör <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants